PMS revert back to old rating from stars

I was able to find that last version of PMS btw… :+1:

Now that even logging from localhost is not allowed to edit critic rating, the only way is updating the database. It worked for me and is quite fast.

These are the steps:

  1. Stop the PMS
  2. Go to database folder (go in PMS root and then \Plug-in Support\Databases)
  3. Make a backup copy of the folder (with stopped server there should be only 2 files inside)
  4. Make a copy of com.plexapp.plugins.library.db (don’t know if there are other namings for this file) and open it with an SQLite editor
  5. Edit the field rating.metadata_items (field rating on table metadata_items) for each record according to your needs, and save the new db (*)
  6. Overwrite the original file with the new one
  7. Restart PMS

(*) if you prefer edit the table with a query you can execute something like this:
UPDATE metadata_items SET rating=8.5 WHERE title='My Title';

Hope they’ll give us back the editing feature, at least from localhost.

1 Like

Manual changes to rating (critic ratings) are overwritten by Plex when metadata is refreshed

This can be prevented by locking the field.

The list of locked fields is stored in metadata_items.user_fields. The rating (critic ratings) field is index 5, so metadata_items.user_fields is set to lockedFields=5 when locked.

If multiple fields are locked they are separated with a |. lockedFields=2|5|7.

The audience_rating field is index 30. To lock critic and audience, use lockedFields=5|30.

I was going to share the ones I know, but I found this. Here are a bunch already listed out:

Updating the PLEX database outside Plex - how? - #5 by HeartWare42

1 Like

Thanks for these infos. I don’t need to lock fields just because I’ve a main PMS synced with agents and a secondary PMS with custom movies not synced (is here where I want to edit the metadata_items.rating field).

1 Like

I understand. I’m posting this for myself and in case @keber007 or others are still looking.

Plex has an HTTP API to allow safer editing of these.

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

But lately I’ve been using the Python PlexAPI for as much as possible. I wasn’t sure if locked fields could be manipulated that way - I verified they can be.

PlexAPI · PyPI

It’s possible to do a few things pretty easily. This might line up with what @keber007 wanted to do - are you still looking?

  1. Iterate through the movies in a Library
  2. Assign the critic rating to the user (star) rating
    (If you previously edited the the critic rating.)
  3. Wipe the critic and audience rating
  4. Lock (or unlock) the critic and audience rating

I’m still watching… lol I have updated the new star “user rating” fields to reflect my prior ratings. I have over 800 movies, so it took me a bit to fumble through it on the iOS app (bc the web app does not allow for 1/2 stars at this time, which is stupid). I have to dig into what you & brunte are suggesting on how I can unlock the IMDB rating field (either in SQL or by reverting to earlier PMS and unlocking in the web app). The 2nd method may be easier for me, as I do not deal with SQL on a regular basis, and would think that simply installing the old version, unchecking the lock field & re-installing would be super fast and easy to do (assuming the old version can read the new DB file… I will keep you posted and let you know how that goes when i have the time to actually get it done… Appreciate the help and feedback! :slight_smile:

Wow Volts, this is really interesting. Are these API REST? I wasn’t able to find official documentation but only few libraries like the one you linked in Python (I don’t know Python). Without documentation, the only way is to search the available requests in the code of the libraries. It would be nice to build up a webapp to manage some fields around PMS.
Btw, do you know if we can do PUT request to edit metadata?
Thx in advance

It’s at least REST-ish! Client-server, resource URIs, stateless. Checks the REST boxes, I think.

The Python PlexAPI docs are a great way to get a sense of what’s possible, even if you don’t know Python. Some of the examples are only a few lines long and you can build from there.

Yes you can edit data. I tested setting/clearing/locking a number of fields in Python.

I started to explain how to do it with HTTP, but then I found this - and it’s already formatted and nice and clear. :slight_smile: :smiley:

New Music Metadata handling - #10 by OttoKerner

As with anything, the more powerful the tool, the faster things can go wrong. Make a backup, blah blah.

@Volts & @brunte

I forgot that windows had a desktop app (NOT PMS, but straight up Plex Media PLAYER)! I was able to open that and unlock the old “rating” field without re-installing PMS, then after I refreshed the metadata for all files, I now have the IMDB rating as well as my “user star rating” fields for all my movies! This also should work for those who want to still use that old rating field as thier own rating field, but I get the sense that Plex is moving towards the star-based user rating, so that may not last if future updates are released…

hope this helps you too @dylanny_bway_net

best of luck to everyone with whatever approach you prefer!

2 Likes

Thx again Volts, it worked. I did it with postman (don’t have time right now to write code).

  1. GET http://yourPlexIP/library/sections?X-Plex-Token=yourPlexToken to retrive the :key of the library you want to work on.
  2. GET http://yourPlexIP/library/sections/:key/all?X-Plex-Token=yourPlexToken to retrieve the :ratingKey of the movie you want to edit (:ratingKey is just id of the movie, don’t know why the name of the field is ratingKay).
  3. GET http://yourPlexIP/library/metadata/:ratingKay?X-Plex-Token=yourPlexToken to get all metadata related to the selected movie
  4. PUT http://yourPlexIP/library/metadata/:ratingKay?rating=9.2&X-Plex-Token=yourPlexToken to set the critic rating of the selected movie to 9.2
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.