mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
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":
|
case "id":
|
||||||
{
|
{
|
||||||
|
// get ids from attributes
|
||||||
string? imdbId = reader.GetAttribute("IMDB");
|
string? imdbId = reader.GetAttribute("IMDB");
|
||||||
string? tmdbId = reader.GetAttribute("TMDB");
|
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))
|
if (!string.IsNullOrWhiteSpace(imdbId))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user