roaku 842 Posted September 12, 2021 Posted September 12, 2021 In my never ending quest to curate all my special features, I've come across a few instances where the title exists in both TMDB and Trakt, but for some reason, Emby only makes the TMDB connection when retrieving metadata. My suspicion is that Emby grabs the Trakt link by way of the TMDB metadata and that it's missing in these cases, but that's just a guess. So, is there anyway to manually add the trakt link to my titles? The metadata editor doesn't have a field for it and even when the trakt info is populated in Emby for a title, it doesn't seem to get written to my nfos. Or maybe I can create a TMDB account and add the links myself? A few examples: https://www.themoviedb.org/movie/517834-the-return-of-the-king-behind-the-scenes https://trakt.tv/movies/the-return-of-the-king-behind-the-scenes-2006 https://www.themoviedb.org/movie/186567-gotham-uncovered-creation-of-a-scene https://trakt.tv/movies/gotham-uncovered-creation-of-a-scene-2008 https://www.themoviedb.org/movie/634118-lady-s-pedigree-the-making-of-lady-and-the-tramp https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006
Luke 42078 Posted September 12, 2021 Posted September 12, 2021 Hi, trakt is not used as a source of metadata, it is only used for syncing your data to and from trakt. Quote My suspicion is that Emby grabs the Trakt link by way of the TMDB metadata and that it's missing in these cases, but that's just a guess. No actually the other way around.
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 11 minutes ago, Luke said: Quote My suspicion is that Emby grabs the Trakt link by way of the TMDB metadata and that it's missing in these cases, but that's just a guess. No actually the other way around. And if you don't have Trakt at all where does this Trakt link come from?
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 (edited) 15 minutes ago, Luke said: Hi, trakt is not used as a source of metadata, it is only used for syncing your data to and from trakt. No actually the other way around. Do you have any idea what might cause what I'm experiencing or how I can resolve it? To use a Lady and the Tramp making of as an example: https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 https://www.themoviedb.org/movie/634118-lady-s-pedigree-the-making-of-lady-and-the-tramp Trakt has a link to the correct TMDB entry: But after Emby's finished retrieving metadata, I only have the TMDB link. Edited September 12, 2021 by roaku
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 (edited) I think I see what is happening, you are just adding IMDBid to trakt url to provide a link. From the link button href="https://trakt.tv/movies/tt8371236" So @roakuif your example above has IMDBid "tt0778759" it should show trakt link. And now TMDB has that externalid added. Edited September 12, 2021 by Happy2Play 1
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 (edited) 12 minutes ago, Happy2Play said: I think I see what is happening, you are just using adding IMDBid to trakt url to provide a link. From the link button href="https://trakt.tv/movies/tt8371236" So @roakuif your example above has IMDBid "tt0778759" it should show trakt link. And now TMDB has that externalid added. Ok, adding the IMDB id manually worked to generate the Trakt link. For reasons I guess. Awesome. Thanks. I'm not going to question it. Edited September 12, 2021 by roaku
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 (edited) Having spent a little more time with it, here's what I see as happening... Emby uses the IMDB id to generate the link to Trakt. Trakt appears to have an internal resolver that will map a Trakt url with an IMDB id as a path parameter like https://trakt.tv/movies/tt0365467 to the public facing Trakt uri for that item: https://trakt.tv/movies/making-the-matrix-1999 *if* that mapping has been created. If it hasn't, the IMDB id based trakt urls 404. Emby seems to be unaware of the mapping. It's a 'dumb' link in the sense that Emby will display the link whether it 404s or maps to the actual trakt entry for that item. There are many examples like Lady's Pedigree, where the item exists in IMDB, TMDB, and Trakt, but Trakt appears to lack the internal mapping to resolve the IMDB id to its own entry for that item: https://www.imdb.com/title/tt0778759 https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 https://www.themoviedb.org/movie/634118-lady-s-pedigree-the-making-of-lady-and-the-tramp You can identify these problem entries in Trakt by looking at the 'IMDB' link in the sidebar. For the non-resolving, problem entries the link goes to an IMDB search page. For the properly mapped entries, the link goes to the actual IMDB result for that entry. Compare: https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 https://trakt.tv/movies/making-the-matrix-1999 I still think it's probably TMDB that needs to be updated to properly link to the Trakt and IMDB entries, but that will take some more digging to verify. Edited September 12, 2021 by roaku
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 37 minutes ago, roaku said: I still think it's probably TMDB that needs to be updated to properly link to the Trakt and IMDB entries, but that will take some more digging to verify. TMDB would need to add trakt to externalids as they currently do not exist from what I see, if this were to come from them.
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 But from what I see it means someone needs to update trakt with imdbids as the button on trakt is searching imdb as it does not have a id. from your example <a target="_blank" href="http://www.imdb.com/find?q=Lady%27s+Pedigree%3A+The+Making+of+Lady+and+the+Tramp&s=tt" data-original-title="" title="">IMDB</a> So dependent on limited provider metadata.
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 1 minute ago, Happy2Play said: But from what I see it means someone needs to update trakt with imdbids as the button on trakt is searching imdb as it does not have a id. from your example <a target="_blank" href="http://www.imdb.com/find?q=Lady%27s+Pedigree%3A+The+Making+of+Lady+and+the+Tramp&s=tt" data-original-title="" title="">IMDB</a> So dependent on limited provider metadata. Right, I mentioned the sidebar link as a way to identify the problem entries. The reason I still suspected TMDB is because Trakt is largely driven by their metadata.
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 So @Lukeshould change to a TMDBid search for the links instead of IMDBid? https://trakt.tv/search/tmdb/634118 Trakt API · Apiary
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 6 minutes ago, Happy2Play said: So @Lukeshould change to a TMDBid search for the links instead of IMDBid? https://trakt.tv/search/tmdb/634118 Trakt API · Apiary Interestingly, that search url resolves properly for Lady's Pedigree from IMDB id: https://trakt.tv/search/imdb/tt0778759 And Lady's Pedigree sidebar IMDB link *now* resolves properly too instead of linking to an IMDB search: https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 So, did someone manually update the metadata at one of these providers? An automated system stepped in to help because I've been hitting the url so much today? I had clicked the metadata refresh button on trakt, but I don't have a paid account, so I just got the sales pitch page... Anyway, I don't think any of this is on Emby to fix. The broken links could happen for IMDB or TMDB from what I can tell. A task or something could be added to test the urls for proper resolution on either/both IMDB and TMDB but that seems like overkill when it's really metadata on another service that needs correcting.
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 Here's another problem entry: https://trakt.tv/movies/looking-at-the-world-in-a-new-way-the-making-of-tenet-2020 May the metadata magic come down upon it too.
Solution Happy2Play 9780 Posted September 12, 2021 Solution Posted September 12, 2021 1 minute ago, roaku said: Interestingly, that search url resolves properly for Lady's Pedigree from IMDB id: https://trakt.tv/search/imdb/tt0778759 And Lady's Pedigree sidebar IMDB link *now* resolves properly too instead of linking to an IMDB search: https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 That was quick, I will guess you can blame me for updating TMDB with that IMDB id. So Trakt is getting IMDB from TMDB.
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 5 minutes ago, roaku said: Anyway, I don't think any of this is on Emby to fix. The broken links could happen for IMDB or TMDB from what I can tell. A task or something could be added to test the urls for proper resolution on either/both IMDB and TMDB but that seems like overkill when it's really metadata on another service that needs correcting. True as in these edge case, are not going to be listed everywhere. 4 minutes ago, roaku said: Here's another problem entry: https://trakt.tv/movies/looking-at-the-world-in-a-new-way-the-making-of-tenet-2020 May the metadata magic come down upon it too. So you would have to input this on TMDB for linking to work as it exists on IMDB.
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 3 minutes ago, Happy2Play said: That was quick, I will guess you can blame me for updating TMDB with that IMDB id. So Trakt is getting IMDB from TMDB. Thanks then. :0 So, I guess the solution is for me to create a TMDB account and update the entries I come across. I've been meaning to create an account anyway so I can (hopefully) add entries for the special features I have that haven't been added yet. Thanks again for testing my assumptions.
roaku 842 Posted September 12, 2021 Author Posted September 12, 2021 (edited) 1 hour ago, Happy2Play said: So @Lukeshould change to a TMDBid search for the links instead of IMDBid? https://trakt.tv/search/tmdb/634118 Trakt API · Apiary I think I'd like to flop my vote on this. I suspected Trakt was leaning on TMDB for its IMDB linking, but you were able to show it pretty clearly with your TMDB edit. To me, this says Emby should switch its Trakt url generation strategy to use the TMDB id, since the IMDB id will only work if there is *also* a TMDB entry for that item that has the IMDB id association. So, a working Trakt url based on IMDB id requires TMDB id + IMDBD id, where a working TMDB id based Trakt url only depends on TMDB id. Obviously, a ton of other considerations could be involved that I know nothing about, but that's how things look to me right now. Edited September 12, 2021 by roaku
Happy2Play 9780 Posted September 12, 2021 Posted September 12, 2021 (edited) The quirk I see in that example is when trakt has multiple entries for that TMDBid. But it provides results. But the way Luke is doing it now is somewhat a limitation of their api even though he is actually not using the api. or possibly parse the title like they do (this looks to be the slug will see if provided by TMDB) Quote https://trakt.tv/movies/lady-s-pedigree-the-making-of-lady-and-the-tramp-2006 As it look to be the same/similar to what TMDB does, needs to add year Quote https://www.themoviedb.org/movie/634118-lady-s-pedigree-the-making-of-lady-and-the-tramp But search/tmdb/id is probably the best approach. /search/trakt/:id?id_type=movie /search/trakt/:id?id_type=show Trakt API · Website Media Links Edited September 12, 2021 by Happy2Play
Luke 42078 Posted September 13, 2021 Posted September 13, 2021 I'd have to check but I believe when we do searches with the trakt api the plugin does try both.
roaku 842 Posted September 13, 2021 Author Posted September 13, 2021 (edited) 52 minutes ago, Luke said: I'd have to check but I believe when we do searches with the trakt api the plugin does try both. I think I see what you're referring to: if (item is Movie movie) { return !string.IsNullOrEmpty(movie.GetProviderId(MetadataProviders.Imdb)) || !string.IsNullOrEmpty(movie.GetProviderId(MetadataProviders.Tmdb)); } https://github.com/MediaBrowser/trakt/blob/c8caaa3f35ea2e64f5bfca5745f2df904778d36b/Trakt/Api/TraktApi.cs#L81 movie = new TraktMovie { title = movie.Name, year = movie.ProductionYear, ids = new TraktMovieId { imdb = movie.GetProviderId(MetadataProviders.Imdb), tmdb = movie.GetProviderId(MetadataProviders.Tmdb).ConvertToInt() } } https://github.com/MediaBrowser/trakt/blob/master/Trakt/Api/TraktApi.cs#L125 So the plugin is more robust for these cases, which is really my main concern. Obviously, it would be nice for the single item view trakt links to only appear when the url actually exists, but much less of a problem if the plugin doesn't share the limitation. Edited September 13, 2021 by roaku
Luke 42078 Posted September 14, 2021 Posted September 14, 2021 For movies, trakt supports this as the url: https://trakt.tv/movies/{imdbid} To base this on moviedb, they would need some similar convention around movie db id's. We don't store the trakt url anywhere. It's just created on the fly based on external ids that the server already has.
roaku 842 Posted September 14, 2021 Author Posted September 14, 2021 (edited) 47 minutes ago, Luke said: For movies, trakt supports this as the url: https://trakt.tv/movies/{imdbid} To base this on moviedb, they would need some similar convention around movie db id's. We don't store the trakt url anywhere. It's just created on the fly based on external ids that the server already has. This search endpoint seems to operate in the same way as the movies endpoint: https://trakt.docs.apiary.io/#reference/search/id-lookup That is, you can feed it a tmdb/imdb/trakt id as a path parameter and trakt will internally resolve that to the trakt url for that item: https://trakt.tv/search/tmdb/677149 There's a decent chance that the 'movies/{imdbid}' endpoint is just a wrapper for 'search/imdb/{imdbid}' Edited September 14, 2021 by roaku 1
Luke 42078 Posted September 15, 2021 Posted September 15, 2021 2 hours ago, roaku said: This search endpoint seems to operate in the same way as the movies endpoint: https://trakt.docs.apiary.io/#reference/search/id-lookup That is, you can feed it a tmdb/imdb/trakt id as a path parameter and trakt will internally resolve that to the trakt url for that item: https://trakt.tv/search/tmdb/677149 There's a decent chance that the 'movies' endpoint with imdb id is just a wrapper for 'movies/{imdbid}' Here's the problem though, when different tmdb objects share the same id: https://trakt.tv/search/tmdb/1405
roaku 842 Posted September 15, 2021 Author Posted September 15, 2021 (edited) 24 minutes ago, Luke said: Here's the problem though, when different tmdb objects share the same id: https://trakt.tv/search/tmdb/1405 They offer a query parameter solution for that: https://trakt.tv/search/tmdb/1405/?id_type=movie https://trakt.tv/search/tmdb/1405/?id_type=person https://trakt.tv/search/tmdb/1405/?id_type=show https://trakt.tv/search/tmdb/1405/?id_type=episode I imagine Emby will have enough context when building the single item page to know what type it is. This would avoid the Trakt 404s I'm seeing when Emby assumes that a given TMDB item will have the optional IMDB id populated. Edited September 15, 2021 by roaku 1
Happy2Play 9780 Posted September 15, 2021 Posted September 15, 2021 Was wondering why I couldn't get type to work as it is should be ?id_type=movie not ?type=movie.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now