plex-lastfm-scrobbler, Scrobble从丛媒体服务器应用程序中播放音频项目 Last.FM

分享于 

7分钟阅读

GitHub

  繁體 雙語
Scrobble played audio items Last.FM from the Plex Media Server application.
  • 源代码名称:plex-lastfm-scrobbler
  • 源代码网址:http://www.github.com/jesseward/plex-lastfm-scrobbler
  • plex-lastfm-scrobbler源代码文档
  • plex-lastfm-scrobbler源代码下载
  • Git URL:
    git://www.github.com/jesseward/plex-lastfm-scrobbler.git
    Git Clone代码到本地:
    git clone http://www.github.com/jesseward/plex-lastfm-scrobbler
    Subversion代码到本地:
    $ svn co --depth empty http://www.github.com/jesseward/plex-lastfm-scrobbler
    Checked out revision 1.
    $ cd repo
    $ svn up trunk
    
    plex-lastfm-scrobbler

    Build Status

    注意:如果你是一个 plex.tv 用户,丛包括它自己的内部服务能力。 为了使你的plex.tv 帐户能够使用 Last.FM 集成浏览到 https://plex.tv/users/other-services,并将你的Last.FM 帐户从 Other Services 连接到。 Announcment通过 https://www.plex.tv/blog/plex-media-server-v0-9-12-5-a-tasty-update/ public。

    plex-lastfm-scrobbler提供了一套脚本,允许你从丛媒体服务器应用程序向播放音频条目。 虽然只在Linux上测试,但plex-lastfm-scrobbler是在跨平台运行的。

    几点点

    • plex-lastfm-scrobbler是一个进程工具。 意思是它不是一个丛媒体服务器插入。 这里工具独立于你的Plex媒体服务器运行。
    • 必须在Plex媒体服务器上运行
    • 解析日志文件中'已经播放'字符串的丛媒体服务器日志。
    • 不区分客户端。 意味着播放的所有媒体在脚本运行时都是 scrobbled。
    • 必须在调试级别设置plex-media-server日志( 而不是详细)

    安装

    Linux,OSX

    建议将( 但不需要) 安装到virtualenvironment中。 可以这样做。

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

    支持通过 pip 或者 easy_install 安装。 例如:pip install plex-scrobble 或者 easy_install plex-scrobble

    如果你希望运行开发构建,从 github repo 中获取并安装源代码。

    
    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获取最新

    
    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配置文件(。丛 scrobble。toml ) 已经安装到 ~/。 可用的配置值如下。

    如果在基于Linux的操作系统上运行of服务器,那么事情应该在框中工作。

    
    [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-scrobbler/bin/activate
    
    
    
    

    运行应用程序

    
    nohup plex-scrobble &
    
    
    
    

    &已知问题疑难解答

    或者浏览github问题列表来查看旧 Bug 或者记录一个新问题。 请参见 https://github.com/jesseward/plex-lastfm-scrobbler/issues?q=


    Server  play  音频  媒体  Items  plex  
    相关文章