INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Sync Plex Ratings back into MC Library? - Solved  (Read 3829 times)

markp99

  • Regular Member
  • World Citizen
  • ***
  • Posts: 191
Sync Plex Ratings back into MC Library? - Solved
« 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

Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72536
  • Where did I put my teeth?
Re: Sync Plex Ratings back into MC Library?
« Reply #1 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.
Logged

markp99

  • Regular Member
  • World Citizen
  • ***
  • Posts: 191
Re: Sync Plex Ratings back into MC Library?
« Reply #2 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!
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Sync Plex Ratings back into MC Library?
« Reply #3 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.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: Sync Plex Ratings back into MC Library?
« Reply #4 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, and then sync it with MC. Definitely possible, but not simple.

If I missed anything and you find anything, let me know.
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

tij

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1563
Re: Sync Plex Ratings back into MC Library?
« Reply #5 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
Logged
HTPC: Win11 Pro, MC: latest 31(64b), NV Driver: v425.31, CPU: i9-12900K, 32GB RAM, GeForce: 2080ti
Screen: LG 2016 E6
NAS: FreeNAS 11.1, SuperMicro SSG-5048R-E1CR36L, E5-1620v4, 64GB ECC RAM, 18xUltrastar He12-SAS3 drives, 2x240GB SSD (OS)

markp99

  • Regular Member
  • World Citizen
  • ***
  • Posts: 191
Re: Sync Plex Ratings back into MC Library? - Solved
« Reply #6 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.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: Sync Plex Ratings back into MC Library? - Solved
« Reply #7 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.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

markp99

  • Regular Member
  • World Citizen
  • ***
  • Posts: 191
Re: Sync Plex Ratings back into MC Library? - Solved
« Reply #8 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.
Logged
Pages: [1]   Go Up