From a4f7eb84cd535017b6d5bd5c7c80efd56a60b4a9 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 13 Jun 2013 14:45:58 -0400 Subject: [PATCH] fixes #347 - File Properties in Video file formats override local xml --- MediaBrowser.Controller/Entities/BaseItem.cs | 5 ++--- MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs | 4 +--- MediaBrowser.Providers/Movies/FanArtMovieProvider.cs | 8 ++++++++ MediaBrowser.Providers/Movies/MovieDbImagesProvider.cs | 2 +- MediaBrowser.Providers/Movies/MovieDbProvider.cs | 2 +- MediaBrowser.Providers/Movies/MovieProviderFromJson.cs | 2 +- MediaBrowser.Providers/Movies/MovieProviderFromXml.cs | 2 +- MediaBrowser.Providers/TV/EpisodeProviderFromXml.cs | 2 +- MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs | 2 +- 9 files changed, 17 insertions(+), 12 deletions(-) diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index fbed70af9a..264f66945a 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -764,7 +764,7 @@ namespace MediaBrowser.Controller.Entities return false; })); - var trailers = LibraryManager.ResolvePaths(files, null).Select(video => + return LibraryManager.ResolvePaths(files, null).Select(video => { // Try to retrieve it from the db. If we don't find it, use the resolved version var dbItem = LibraryManager.RetrieveItem(video.Id) as Trailer; @@ -776,9 +776,8 @@ namespace MediaBrowser.Controller.Entities } return video; - }).ToList(); - return trailers; + }).ToList(); } /// diff --git a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs index 05619256cf..99d1cdbc1e 100644 --- a/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs +++ b/MediaBrowser.Providers/MediaInfo/BaseFFProbeProvider.cs @@ -37,9 +37,7 @@ namespace MediaBrowser.Providers.MediaInfo /// The priority. public override MetadataProviderPriority Priority { - // Give this second priority - // Give metadata xml providers a chance to fill in data first, so that we can skip this whenever possible - get { return MetadataProviderPriority.Second; } + get { return MetadataProviderPriority.First; } } protected readonly CultureInfo UsCulture = new CultureInfo("en-US"); diff --git a/MediaBrowser.Providers/Movies/FanArtMovieProvider.cs b/MediaBrowser.Providers/Movies/FanArtMovieProvider.cs index 097df336d9..b34a692d3e 100644 --- a/MediaBrowser.Providers/Movies/FanArtMovieProvider.cs +++ b/MediaBrowser.Providers/Movies/FanArtMovieProvider.cs @@ -85,6 +85,14 @@ namespace MediaBrowser.Providers.Movies } } + public override MetadataProviderPriority Priority + { + get + { + return MetadataProviderPriority.Fourth; + } + } + /// /// The fan art base URL /// diff --git a/MediaBrowser.Providers/Movies/MovieDbImagesProvider.cs b/MediaBrowser.Providers/Movies/MovieDbImagesProvider.cs index f9173da679..5847fcd693 100644 --- a/MediaBrowser.Providers/Movies/MovieDbImagesProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbImagesProvider.cs @@ -64,7 +64,7 @@ namespace MediaBrowser.Providers.Movies /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.Fourth; } + get { return MetadataProviderPriority.Last; } } /// diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index b25a61c4eb..a4154207ab 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -83,7 +83,7 @@ namespace MediaBrowser.Providers.Movies /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.Second; } + get { return MetadataProviderPriority.Third; } } /// diff --git a/MediaBrowser.Providers/Movies/MovieProviderFromJson.cs b/MediaBrowser.Providers/Movies/MovieProviderFromJson.cs index 2732ba3929..529122f40a 100644 --- a/MediaBrowser.Providers/Movies/MovieProviderFromJson.cs +++ b/MediaBrowser.Providers/Movies/MovieProviderFromJson.cs @@ -46,7 +46,7 @@ namespace MediaBrowser.Providers.Movies /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.First; } + get { return MetadataProviderPriority.Second; } } /// diff --git a/MediaBrowser.Providers/Movies/MovieProviderFromXml.cs b/MediaBrowser.Providers/Movies/MovieProviderFromXml.cs index a0afaafc4b..b7d3e6e570 100644 --- a/MediaBrowser.Providers/Movies/MovieProviderFromXml.cs +++ b/MediaBrowser.Providers/Movies/MovieProviderFromXml.cs @@ -42,7 +42,7 @@ namespace MediaBrowser.Providers.Movies /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.First; } + get { return MetadataProviderPriority.Second; } } /// diff --git a/MediaBrowser.Providers/TV/EpisodeProviderFromXml.cs b/MediaBrowser.Providers/TV/EpisodeProviderFromXml.cs index bbfa0a3bf4..498088eacc 100644 --- a/MediaBrowser.Providers/TV/EpisodeProviderFromXml.cs +++ b/MediaBrowser.Providers/TV/EpisodeProviderFromXml.cs @@ -37,7 +37,7 @@ namespace MediaBrowser.Providers.TV /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.First; } + get { return MetadataProviderPriority.Second; } } /// diff --git a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs index 3fe3d6c00b..4b46948af9 100644 --- a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs @@ -65,7 +65,7 @@ namespace MediaBrowser.Providers.TV /// The priority. public override MetadataProviderPriority Priority { - get { return MetadataProviderPriority.Second; } + get { return MetadataProviderPriority.Third; } } ///