xbmc / metadata.themoviedb.org.python

Other
44 stars 40 forks source link

Support looking up via uniqueIDs (filename identifiers) #205

Closed sundermann closed 6 months ago

sundermann commented 7 months ago

Add the needed changes for looking up by unique identifiers required for supporting filename identifiers. The current implementation allows only for tmdb and imdb identifiers because no additional call to find by id is done. tmdb does support looking up by Facebook, Instagram, TikTok, Twitter, Wikidata and YouTube but the benefit of those identifiers is questionable. The normal tmdb movie API accepts imdb identifiers which is probably the most common identifier besides native tmdb identifiers.

The implementation does not catch errors which means that if a wrong identifier is supplied in the filename an error message is shown in kodi. It is up to debate if it would be better to catch the exception in case of a unique identifier lookup and fail silently. If a movie could not be looked up, Kodi falls back to the traditional lookup by title and year.

rmrector commented 7 months ago

Agreed about low benefit for the other identifiers.

Where is there error message coming from? That shouldn't happen - we do not want to see an error if things are working as expected. Scrapers can log a debug message if they receive an ID they don't recognize, but not much more than that.

sundermann commented 7 months ago

TMDB returns 404 if called with a non-existing id: 2023-12-09 17:24:14.493328+0100 Kodi[62051:9174096] 2023-12-09 17:24:14.493 T:9174096 warning <general>: [metadata.themoviedb.org.python]: The Movie Database Python error with web service TMDB: failed to reach the remote site Reason: Not Found

sundermann commented 7 months ago

It fails silently now for the uniqueIDs lookup showing no error notification but still logging the error

rmrector commented 7 months ago

Why log as a warning? This is expected behavior now. Any message that shows up outside of debug will generate more support requests.

sundermann commented 7 months ago

Alright, changed it to skip logging as well

rmrector commented 6 months ago

Cheers