beets
beets copied to clipboard
Import (and sync) Plex music library details
Plex is a great tool to manage and play music. Many users use Plex for playing music and manually provide track/album ratings and create playlists. Currently, this information is only available inside Plex. However, I like the idea of using Beets for managing the entire library so that we can use other tools like Subsonic. Thus, it would be great to import all the library details, like play count, ratings, playlists, etc. from Plex.
There are several other plugins that import stats (e.g., LastImport), so I am assuming this is something that Beets would want to do. In addition, we already have the basic infrastructure in terms of Plex connectivity.
Proposed solution
I am not too familiar with the underlying architecture of Beets and would leave this to the experts. But here's what I found.
- The table
metadata_item_settingshas the required information. The play count is available under columnview_countand the columnratinghas the rating information (if the user has explicitly rated a track) on a 10 point scale.

- Like other plugins (e.g., MusicBrainz, LastImport), we will need to add some Plex-specific fields like
guidto map the tracks.
Objective
https://github.com/beetbox/beets/discussions/4077
Goals
Having play count and user ratings in beets can improve the overall discovery process. Other plugins can leverage this information to generate better recommendations/playlists.
Sounds good! Maybe a good first step would be investigating the Plex API endpoints required to list all the music in a database?
This has everything we need - https://python-plexapi.readthedocs.io/en/latest/modules/audio.html
Added a community plugin beets-plexsync that does this and more. Closed via https://github.com/beetbox/beets/pull/4694