mynttt / UpdateTool

A tool to update the IMDB ratings for Plex libraries that contain movies/series and use the IMDB agent to receive ratings
GNU General Public License v3.0
256 stars 12 forks source link

TV Series rating #107

Closed underlow closed 3 weeks ago

underlow commented 1 year ago

If you get rating updates on your episodes but not on your TV Shows, you'll have to get access to a TVDB API key. This is because the tool finds IMDB IDs that are associated with the episodes in the database, but for the TV Shows it only finds TVDB IDs that have to be resolved into IMDB IDs by calling their API. Unless you have a key, this is not possible and means that no updates are processed for these items

I do not have TVDB key and as I can see my episodes have rating when whole series do not have rating as stated in quoted text.

But if I comment that code:

    public static ImdbLibraryMetadata fetchAll(List<Library> libraries, ImdbDatabaseSupport db, ImdbPipelineConfiguration configuration) {
        var meta = new ImdbLibraryMetadata();
        for(var lib : libraries) {
            var items = db.requestEntries(lib.id, lib.type);
//            if(configuration.resolveTvdb() && lib.type == LibraryType.SERIES) {
                items.addAll(db.requestTvSeriesRoot(lib.id));
                items.addAll(db.requestTvSeasonRoot(lib.id));
//            }
            meta.metadata.put(lib.uuid, items);
        }
        return meta;
    }

everything works and I can see in logs that TV shows get their rating. Meaning it can work without TVDB key.

Can it be fixed or I'm missing something here?

mynttt commented 1 year ago

I guess that code structure is from before Plex added the IMDB ids to some entries in the database. When you comment the check out and then run it without a TVDB key in the background if those IMDB ids exist in the database they can be used with the IMDB dataset that is downloaded locally.

Shows that do not have these IDs and only provice TVDB ids would then not be resolved. I guess there is no error because at some other place the code as a fallback where the missing TVDB key is handled gracefully in these situations.

I possible option would be to add a switch to override the need of supplying a TVDB key so what you have changedin the code fragment could be configured from the outside as well.

If you're still interested in that I could add such a switch.

rogales commented 1 month ago

Have exactly the same problem. IMDB Ratings are not visible for TV Series, but only for Episodes. Any way of fixing this problem?

But by the way, I would like to ask, if there is any possibility do add (next to imdb ratings) any other different services? Like Rotten Tometoes, or (for my personal whim) polish service named filmweb.

Thanks!

underlow commented 1 month ago

@mynttt sorry I probably missed notification year ago, it was working for me when I commented these lines but now I've switched to another tool. But thank you anyway.

mynttt commented 3 weeks ago

Has now been fixed with 1.9.1! It had to verify first that it has no negative side effects; thanks for still responding after such a long time @underlow :D