Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved ratings support with other misc adjustments #142

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

almightiest
Copy link

@almightiest almightiest commented Jun 14, 2022

  1. Reduced amount of logging for Info vs Debug to reduce log rolling
  2. Support for theme music
  3. Support for Kodi v18+ ratings format:76.0000000
    • name
    • max (will convert to 10 from any value in max if max is present)
    • default (will prefer default='true' ratings and will not average additional ratings)
  4. critic vs audience ratings map
    • TODO: convert this to UI configuration in the future
    • BREAKING CHANGE: this will change previous critic ratings to audience ratings if the source is imdb/themoviedb/trakt
  5. average ratings - if multiple critic ratings exist, and no default set, take the average of them all (since Plex only supports a single rating for critic). same applies to audience ratings.
  6. Add votes to ratings in description
  7. Support more display formats for ratings in description (imdb decimal, rt 100 max with %, metacritic 100 max without %)
  8. Add images to ratings (limited support for IMDb icon in plex web, but other clients support more images)

Peter Pan example:

NFO file:

<rating>7.300000</rating>
<votes>137506</votes>
<ratings>
        <rating name="tomatometerallcritics" max="100" default="false">
                <value>79.000000</value>
                <votes>0</votes>
        </rating>
        <rating name="metacritic" max="100" default="false">
                <value>76.000000</value>
                <votes>0</votes>
        </rating>
        <rating name="themoviedb" max="10" default="false">
                <value>7.200000</value>
                <votes>4353</votes>
        </rating>
        <rating name="imdb" max="10" default="true">
                <value>7.300000</value>
                <votes>137506</votes>
        </rating>
</ratings>

Movie description:
★ tomatometerallcritics: 79% | metacritic: 76 | themoviedb: 7.2 (4,353 votes) | imdb: 7.3 (137,506 votes) ★

This results in an average critic rating of 7.8 and an audience rating of 7.3 (since imdb was set to default in nfo file).

…o reduce log rolling

2. Support for themes
3. Support for Kodi v18+ ratings format:<ratings><rating name='tomatometerallcritics' max='100' default='false'><value>76.000000</value><votes>0</votes></rating></ratings>
   - name
   - max (will convert to 10 from any value in max if max is present)
   - default (will prefer default='true' ratings and will not average additional ratings)
   - critic vs audience ratings map
     + TODO: convert this to UI configuration in the future
   - average ratings - if multiple critic ratings exist, and no default set, take the average of them all (since Plex only supports a single rating for critic).  same applies to audience ratings.
4. Add votes to ratings in description
5. Support more display formats for ratings in description (imdb decimal, rt 100 max with %, metacritic 100 max without %)
6. Add images to ratings (limited support for IMDb icon in plex web, but other clients support more images)
metadata.rating = add_rating_value
metadata.rating_count = add_votes

if audience_ratings_found == 0:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the intention is good, I don't agree that we want to do this? In my testings, we just get the same rating shown twice. With the same logo.

Was the intention to have two critic ratings shows side by side? Or what was the idea here?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately the latest versions of Plex made this custom importer useless due to Plex server constantly crashing during import. I've since switched to jellyfin. I don't have an easy way to spin this back up and test against my library, apologies.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's ok :)

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll see if I can make it work myself on my own fork :)

Thanks for the idea and groundwork :D

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But, if you have the time.
Could you entertain me what the expected behavior of this lump of code was?
Can you remember what your thought-process was? :)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe it was to be sure to always have both critic and audience ratings values set to make sorting work better in the app. If it was 0.0 value it made filtering and sorting hard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants