通过Plex Media Center播放的拼凑音频曲目

plex-scrobble的Python项目详细描述


Build Status

Plex Lastfm Scrobbler提供了一组脚本,允许您 从Plex媒体服务器将播放的音频项目搜索到last.fm 申请。Plex Lastfm Scrobbler是为跨平台运行而构建的, 不过只在Linux上测试过。

几点

  • Plex Lastfm Scrobbler是一个进程外工具。意思是它不是 Plex媒体服务器插件。这个工具独立于你的丛运行 媒体服务器。
  • 必须在PLEX媒体服务器上运行
  • 分析Plex媒体服务器日志中的“已播放”字符串 文件。
  • 不区分客户。意思是所有媒体播放, 将在脚本运行时进行搜索。
  • 必须将plex媒体服务器日志设置为调试级别(而不是详细级别)

安装

linux,操作系统x

建议(但不是必需)将其安装到 虚拟环境。这样做是可以的。

virtualenv ~/.virtualenvs/plex-lastfm-scrobbler
source ~/.virtualenvs/plex-lastfm-scrobbler/bin/activate

支持通过pipeasy_install安装。例如 :pip install plex-scrobbleeasy_install plex-scrobble

如果要运行开发生成,请从 Github回购协议。

git clone https://github.com/jesseward/plex-lastfm-scrobbler.git
cd plex-lastfm-scrobbler
python setup.py install
pip install -r dev_requirements.txt # for mock/testing packages.

或者,您可以从github获取最新的zip文件

wget https://github.com/jesseward/plex-lastfm-scrobbler/archive/master.zip
unzip master.zip
cd plex-lastfm-scrobbler-master
python setup.py install

你完了。

配置

运行向导以生成配置文件

plex-scrobble --wizard

plex lastfm scrobbler配置文件(.plex scrobble.toml)是 安装到~/。以下配置值可用。

如果您在基于Linux的操作系统上运行PLEX媒体服务器, 事情应该开箱即用。

[lastfm]
# REQUIRED: You'll need to create a last.fm API application first. Do so here:
# http://www.last.fm/api/account/create
api_key = "YOUR_API_KEY"
api_secret = "YOUR_API_SECRET"
user_name = "LAST_FM_USERNAME"
password = "LAST_FM_PASSWORD"

[plex-scrobble]
# mediaserver_log_location references the log file location of the plex media server
# the default under /var/lib/... is the default install of plex media server on
# a Linux system. You may wish to change this value to reference your OS install.
# https://support.plex.tv/hc/en-us/articles/200250417-Plex-Media-Server-Log-Files
mediaserver_log_location = "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log"

# REQUIRED: Where do you wish to write the plex-scrobble log file.
log_file = "/tmp/plex-scrobble.log"

# REQUIRED: mediaserver_url is the location of the http service exposed by Plex Media Server
# the default values should be 'ok', assuming you're running the plex scrobble
# script from the same server as your plex media server
mediaserver_url = "http://localhost:32400"

# REQUIRED: a python data struture that stores failed scrobbles. plex-scrobble
# will retry on a 60 minute interval, maximum of 10 attempts if last.fm is
# experiencing issues.
cache_location = "/tmp/plex_scrobble.cache"

# OPTIONAL: plex_token defines the plex token used to get metadata
# Note: This is required if you use localhost or 127.0.0.1 and Plex Media Server >= 1.1.0
# You will know if you see a line like this your log_file:
# [plex_scrobble.plex_monitor fetch_metadata] [ERROR] urllib2 error reading from http://localhost:32400/library/metadata/48080 'HTTP Error 401: Unauthorized'
# Here is how you can obtain your token https://support.plex.tv/hc/en-us/articles/204059436-Finding-your-account-token-X-Plex-Token
plex_token = "YOUR_PLEX_TOKEN"

运行

如果将plex lastfm scrobble安装到虚拟环境中,请启用 虚拟环境。

source ~/.virtualenvs/plex-lastfm-scrobber/bin/activate

运行应用程序

nohup plex-scrobble &

疑难解答和已知问题

或者浏览github问题列表以查看旧的bug或记录新的 问题。见 https://github.com/jesseward/plex-lastfm-scrobbler/issues?q=

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java变量始终存储0值。为什么?   如何使用Java/REST将Azure blob从一个存储容器移动到另一个存储容器?   java将commons DBCP从1.2升级到1.4,我应该害怕吗?   java如何使用分隔符拆分字符串?   java使用数组读取json对象   java在groovy中切片字符串   交换数组java的两个邻域元素   java移动用于确定字符串是否为回文的逻辑   java Android应用程序在一个活动中崩溃   java Sparkjava将webapp文件夹设置为静态资源/模板的文件夹   java复杂条件表达式,用户易用。   java如何仅在表存在时从表中选择值   java I无法将数据从Recyclerview传递到其他活动   java数据结构最佳设计(大数据)   java Android从DatePickerDialogFragment中删除日历视图   java将数据从Firebase获取到片段   数组。sort()在java中运行不正常