INTERACT FORUM

Windows => Third Party Plug-ins, Programs, and Skins => Topic started by: markp99 on June 11, 2020, 02:10:25 pm

Title: Sync Plex Ratings back into MC Library? - Solved
Post by: markp99 on June 11, 2020, 02:10:25 pm
I manage my library using MC26, working great.  I use Plex/PlexAmp apps for playback on my AndroidTV and Android Phone.  I also use the Plex+Tidal integration to stream from that service using these apps.

I was hopeful ratings made against my local content would become available and visible in my MC Library.  Sadly, the ratings made on Plex are not visible.  I do notice Plex manages to get very confused with my MC Library settings for Artist/Album/Track, so maybe it's trying to be smart with external tags, vs tags from my MC Library?

Are there any mechanisms to collect and sync my Plex Ratings back to my MC Library?

- Thx

Title: Re: Sync Plex Ratings back into MC Library?
Post by: JimH on June 11, 2020, 02:25:26 pm
Are there any mechanisms to collect and sync my Plex Ratings back to my MC Library?
No.
Title: Re: Sync Plex Ratings back into MC Library?
Post by: markp99 on June 11, 2020, 05:09:26 pm
No.

Thanks, Jim.  I did not expect any built-in MC support for such a task.

I guess I was thinking more along the lines of a periodic manual file export from Plex, some manipulation/formatting, then updating the ratings in MC.

Plex knows the correct filename and path; it's pointing to the same file system where my MC library resides.   I guess, chunking the task down a bit, if I had the following detail in a file (txt, XML, etc.), could MC Ratings be updated externally?

- Path
- File Name
- Rating (i.e., 1-5 range)

Thanks!
Title: Re: Sync Plex Ratings back into MC Library?
Post by: RoderickGI on June 11, 2020, 05:44:48 pm
MR Ratings is a third party tool. So is MCUtils and Swag of Tools. Any of them might do what you want, but you will need to investigate yourself or ask the authors.
Title: Re: Sync Plex Ratings back into MC Library?
Post by: glynor on June 11, 2020, 06:34:20 pm
It isn't a super-simple task to get metadata in and out of Plex's Library. I've looked into it to sync playstats with MC (so that Playcount and Bookmarks would sync between MC and Plex) and deemed it Very Difficult. I think you'd need to develop an application that could read/write against the Plex library.db via SQL commands (https://support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/), and then sync it with MC. Definitely possible, but not simple.

If I missed anything and you find anything, let me know.
Title: Re: Sync Plex Ratings back into MC Library?
Post by: tij on June 12, 2020, 06:45:59 am
Maybe can access Plex info through their web interface

https://support.plex.tv/articles/201638786-plex-media-server-url-commands/

Not easy too lol
Title: Re: Sync Plex Ratings back into MC Library? - Solved
Post by: markp99 on June 16, 2020, 03:50:43 pm
I found a dirt simple approach, no scripts:

1. Rate your music via the normal Plex clients
  a. I use a 1 to 5 Star scheme
  b. I rate as I listen, or not :)

2. Create Smart Playlists on Plex Media Server
  a. See:  https://www.ryananddebi.com/2019/08/26/plex-how-to-create-smart-auto-updating-music-playlists/
  b. I created (5) playlists as:  1-Star, 2-Star, 3-Star, 4-Star, 5-Star
  c. You can add additional Plex library criteria as you see fit
  d. These playlists are always refreshing based on your criteria/actions

3. Add the "ExportTools" Plugin to Plex
  a. See:  https://awesomeopensource.com/project/ukdtom/ExportTools.bundle
  b. Essentially copy & paste the "bundle" into the correct Plex location
  c. Here:  %LOCALAPPDATA%\Plex Media Server\Plug-ins

4. Using the “ExportTools” Plugin from within Plex
  a. Here:  Plex Settings > Manage > Plugins
  b. ExportTools Settings > Select Playlist > Reload Playlists > Save (first time thru only)
  c. For each Playlist:  Settings > 1-Star > Create m3u8 Playlist > Simple > Save
  d. The (5) playlists (both csv & m3u8 formats) are written to the “...\Export\ExportTools\” folder

5. Using JRiver Media Center, Import each Playlist
  a. Import each of the (5) Playlists, one at a time
  b. File > Import Playlist > “Playlist – 1-Star…m3u8”

6. From JRiver Media Center, Modify the Ratings value
  a. Select the desired Imported Playlist (i.e., 1-Star)
  b. Select all the matching tracks (Ctl_A)
  c. Select 1 Star Rating (modifies all the selected tracks at once)
  d. Rinse and repeat for each of the 5 Playlists
  e. Done!

For my 1500 track library, I was able to complete the Export/Import/Update process in less than a few minutes.  Easy!

I plan to repeat the process every now and then to keep Plex and Media Center Ratings somewhat in-sync.
Title: Re: Sync Plex Ratings back into MC Library? - Solved
Post by: RoderickGI on June 16, 2020, 07:13:00 pm
Some Playlist file types can carry metadata, and MC will update its metadata when they are imported. MC uses its own MPL format for exports from one MC installation and import to another.

But MC can also import NFO files, and XML, so maybe you can find a common file type between PLEX and MC that would carry the Ratings across. Maybe carry the Number of Plays as well. That could reduce your steps to Export Playlist from PLAX, Import Playlist into MC.

Just a thought.
Title: Re: Sync Plex Ratings back into MC Library? - Solved
Post by: markp99 on June 17, 2020, 09:51:45 am
Some Playlist file types can carry metadata, and MC will update its metadata when they are imported. MC uses its own MPL format for exports from one MC installation and import to another.

But MC can also import NFO files, and XML, so maybe you can find a common file type between PLEX and MC that would carry the Ratings across. Maybe carry the Number of Plays as well. That could reduce your steps to Export Playlist from PLAX, Import Playlist into MC.

Just a thought.
Thanks Roderick,

I was initially envisioning a more direct approach as you describe.  For me the shortest path to getting my ratings OUT of Plex was to use the Export plugin.  The MC import piece could be smarter, with fewer steps, I am sure.  But, the round trip duration of the brute force method above really is just a few minutes.

Maybe I'll revisit the approach if it feels too "heavy" over time.  Embedding the Ratings detail into the Playlist, or as an .NFO file could be interesting.