Back to Blog
Plex lastfm scrobbler linux5/8/2023 Then add or amend the following lines to have Mopidy listen on all IPv4 addresses on this machine, and while we’re here, we might as well set the correct country and language codes for Iris: enabled = true hostname = 0.0.0.0 port = 6600 enabled = true hostname = 0.0.0.0 port = 6680 country = GB locale = en_GB Let’s edit the Mopidy service config file: sudo nano /etc/mopidy/nf This is no good as we need it to accept connections from the outside world. music player) client connections and web connections on the loopback interface for our server. This shows us that the Mopidy daemon is listening for MPD (i.e. You should see some output like the following: enabled = true hostname = 127.0.0.1 port = 6600 enabled = true hostname = 127.0.0.1 port = 6680 Let’s take a look at the service’s configuration: sudo mopidyctl config | more By default, it cleverly will not run as root, but it's under its own user. We should now be able to see it running happily in the background. Since we don’t need to reboot the whole server right now, let’s just start Mopidy up and check its status: sudo service mopidy start sudo service mopidy status Then on the Package Configuration screen check, you are happy with the description and hit Yes. Run this command: sudo dpkg-reconfigure mopidy Next, let’s get Mopidy running as a service, so it starts automatically on server reboots and runs happily in the background streaming our music. You may need to install the pip package first: sudo apt install python-pip sudo pip install Mopidy-Spotify-Webįinally, install the Iris pip package to have an actual UI to interact with the server and play music with. Next, install the Mopidy Spotify Web extension, which allows us to browse artists and albums in our Spotify Premium account library, from the Python source as a Pip Install’s Package package (gotta love that Unix style recursive naming). For Spotify, this is easy as we have a nice Debian-based package available for the Mopidy Spotify extension: sudo apt-get install mopidy-spotify If you installed plex-lastfm-scrobble to a virtual environment, enable the virtual env.Then let’s grab an extension for an existing audio streaming service we listen to music from. # urllib2 error reading from 'HTTP Error 401: Unauthorized' # You will know if you see a line like this your log_file: # Note: This is required if you use localhost or 127.0.0.1 and Plex Media Server >= 1.1.0 # OPTIONAL: plex_token defines the plex token used to get metadata # will retry on a 60 minute interval, maximum of 10 attempts if last.fm isĬache_location = "/tmp/plex_scrobble.cache" Mediaserver_url = " # REQUIRED: a python data struture that stores failed scrobbles. # script from the same server as your plex media server # the default values should be 'ok', assuming you're running the plex scrobble # REQUIRED: mediaserver_url is the location of the http service exposed by Plex Media Server # REQUIRED: Where do you wish to write the plex-scrobble log file. Mediaserver_log_location = "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Logs/Plex Media Server.log" You may wish to change this value to reference your OS install. is the default install of plex media server on # mediaserver_log_location references the log file location of the plex media server # REQUIRED: You'll need to create a last.fm API application first. It is recommended (but not required) that you install this into a virtualenvironment. Your plex-media-server logs must be set at DEBUG level (not VERBOSE). Meaning all media played, will be scrobbled while the script is running. Does not differentiate between clients.Parses Plex Media Server logs for the 'got played' string in the log file.This tool runs separately of your Plex Media Server. Meaning it is not a Plex Media Server plug-in. plex-lastfm-scrobbler is an out of process tool.plex-lastfm-scrobbler was built to run across platforms, though only tested on Linux. Plex-lastfm-scrobbler provides a set of scripts that allow you to scrobble played audio items to Last.FM from the Plex Media Server application. In order to enable your Plex.Tv account for Last.FM integration browse to and link your Last.fm account from the Other Services. NOTE : If you're a user, Plex includes its own internal scrobbling capabilities.
0 Comments
Read More
Leave a Reply. |