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
Prefer MetadataProvider enum as provider id key over arbitrary strings #7654
Prefer MetadataProvider enum as provider id key over arbitrary strings #7654
Conversation
1708707
to
179332d
Compare
7bdd896
to
48e9e3d
Compare
48e9e3d
to
7084541
Compare
Prefer MetadataProvider enum as provider id key over arbitrary strings (cherry picked from commit a2abae3) Signed-off-by: crobibero <cody@robibe.ro>
This doesn't work with Kodi NFO exports and the newest TheMovieDb python scraper they recommend to use. Long story short, they set the type as "themoviedb" instead of "tmdb" so the enum doesn't match. May need to have some kind of dictionary lookup to map from themoviedb to the tmdb enum? |
I can only see the long name being used by the rating and that one we handle (not properly but we handle it and use the rating) |
Their new scraper sets both the rating name and uniqueid type to "themoviedb" from what I'm seeing. When I clear out the provider id in my Jellyfin metadata, update the NFO to use the new format, and initiate a Jellyfin metadata replace for the movie, it doesn't import the external id. Once I change the uniqueid type back to "tmdb" (overriding what Kodi exports) it imports again in Jellyfin 10.8.0b3. |
I tried all available metadata scrapers in the Kodi 20 alpha and the NFO was never written with |
Weird, maybe something else caused it to get changed. I did look at the Kodi video119 database (from Kodi v19) and the uniqueid type exists as |
I re-ran some tests and isolated it to just Kodi and their newest python scraper, and it did as you said, |
The key of provider IDs can be set to arbitrary strings from external sources like NFOs.
To properly handle cases where these strings resemble internally available a value in the
MetadataProvider
enum we should use those values and not the string for best compatibility.