From 3a900f9d9065a668c5b83f63a036aa0a5eeb48b1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Sep 2015 11:29:29 -0400 Subject: [PATCH 01/11] fix id parsing in MovieResolver --- .../Library/Resolvers/Movies/MovieResolver.cs | 28 +++++++++++-------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs index 0d1e4202c..ff38e057b 100644 --- a/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs +++ b/MediaBrowser.Server.Implementations/Library/Resolvers/Movies/MovieResolver.cs @@ -125,7 +125,7 @@ namespace MediaBrowser.Server.Implementations.Library.Resolvers.Movies } else if (IsIgnored(child.Name)) { - + } else { @@ -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); + } } } } From 11d22aba5abd5a35e563944058e2529328349be4 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 20 Sep 2015 11:29:41 -0400 Subject: [PATCH 02/11] add IgnoreDataMember to MusicAlbum --- MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs index 807beee52..98d1eb4ce 100644 --- a/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs +++ b/MediaBrowser.Controller/Entities/Audio/MusicAlbum.cs @@ -66,6 +66,7 @@ namespace MediaBrowser.Controller.Entities.Audio /// Gets the tracks. /// /// The tracks. + [IgnoreDataMember] public IEnumerable