通过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第三方库


热门话题
swing在Java中使用GridBagLayout   java如何在fxml中为单选按钮设置负数?   itextsharp:java到vb。网   java创建映射<String,List<Integer>>   java Tomcat 9/JNDI数据源无法为连接URL“null”创建类“”的JDBC驱动程序   java中未知变量方程的数学求解   java如果在Web服务器上运行,rand(时间戳)是如何工作的?   java如何将行从数据库传输到JTable,并使用编辑JTable字段更新数据库?   java Rubik的立方体模拟器故障   java我想数一数我在测验应用程序中提交的每一个对错答案,并想在文本视图中显示分数   java PostgreSQL是否支持流式保存字节数组数据?   javafx:如何向ListView添加颜色选择器?   当Nginx入口重新加载以进行POST时,java Apache HTTP客户端抛出NoHttpResponseException   java如何使用HttpClient处理HTTP/2 GOAWAY?