|
@@ -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))
|