mirror of https://github.com/jellyfin/jellyfin.git
Fix id tag setting IMDb id when it is TMDb id
This commit is contained in:
parent
97fd136a8c
commit
8a74d76598
|
@ -47,12 +47,19 @@ namespace MediaBrowser.XbmcMetadata.Parsers
|
|||
{
|
||||
case "id":
|
||||
{
|
||||
// get ids from attributes
|
||||
string? imdbId = reader.GetAttribute("IMDB");
|
||||
string? tmdbId = reader.GetAttribute("TMDB");
|
||||
|
||||
if (string.IsNullOrWhiteSpace(imdbId))
|
||||
// read id from content
|
||||
var contentId = reader.ReadElementContentAsString();
|
||||
if (contentId.Contains("tt", StringComparison.Ordinal) && string.IsNullOrEmpty(imdbId))
|
||||
{
|
||||
imdbId = reader.ReadElementContentAsString();
|
||||
imdbId = contentId;
|
||||
}
|
||||
else if (string.IsNullOrEmpty(tmdbId))
|
||||
{
|
||||
tmdbId = contentId;
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||
|
|
Loading…
Reference in New Issue