add movie resolver fix

This commit is contained in:
Luke Pulverenti
2015-09-09 23:22:52 -04:00
parent 38ff6565c6
commit ce0435a66d
11 changed files with 80 additions and 22 deletions

View File

@@ -2181,7 +2181,7 @@ namespace MediaBrowser.Server.Implementations.Library
}
}
return item.People ?? new List<PersonInfo>();
return new List<PersonInfo>();
}
public List<Person> GetPeopleItems(InternalPeopleQuery query)

View File

@@ -309,20 +309,26 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies
//we need to only look at the name of this actual item (not parents)
var justName = item.IsInMixedFolder ? Path.GetFileName(item.Path) : Path.GetFileName(item.ContainingFolderPath);
// check for tmdb id
var tmdbid = justName.GetAttributeValue("tmdbid");
if (!string.IsNullOrEmpty(tmdbid))
if (!string.IsNullOrWhiteSpace(justName))
{
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
// check for tmdb id
var tmdbid = justName.GetAttributeValue("tmdbid");
if (!string.IsNullOrWhiteSpace(tmdbid))
{
item.SetProviderId(MetadataProviders.Tmdb, tmdbid);
}
}
// check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)
var imdbid = item.Path.GetAttributeValue("imdbid");
if (!string.IsNullOrEmpty(imdbid))
if (!string.IsNullOrWhiteSpace(item.Path))
{
item.SetProviderId(MetadataProviders.Imdb, imdbid);
// check for imdb id - we use full media path, as we can assume, that this will match in any use case (wither id in parent dir or in file name)
var imdbid = item.Path.GetAttributeValue("imdbid");
if (!string.IsNullOrWhiteSpace(imdbid))
{
item.SetProviderId(MetadataProviders.Imdb, imdbid);
}
}
}
}