From 75ea0b4ff9c6191d169c895b8c7f0973ccb2d453 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 25 Jul 2013 16:59:28 -0400 Subject: [PATCH] added tvdb updates setting --- MediaBrowser.Model/Configuration/ServerConfiguration.cs | 6 ++++++ MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs | 2 +- MediaBrowser.Providers/TV/RemoteSeriesProvider.cs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index 2cb0eef48..865b4af5f 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -225,6 +225,12 @@ namespace MediaBrowser.Model.Configuration public ManualLoginCategory[] ManualLoginClients { get; set; } + /// + /// Gets or sets a value indicating whether [enable tv db updates]. + /// + /// true if [enable tv db updates]; otherwise, false. + public bool EnableTvDbUpdates { get; set; } + /// /// Initializes a new instance of the class. /// diff --git a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs index 438d49507..9ccbd3eb7 100644 --- a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs @@ -121,7 +121,7 @@ namespace MediaBrowser.Providers.TV protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) { // Don't proceed if there's local metadata - if (HasLocalMeta(item)) + if (HasLocalMeta(item) && !ConfigurationManager.Configuration.EnableTvDbUpdates) { return false; } diff --git a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs index 445cf5c3f..56ba654ad 100644 --- a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs @@ -235,7 +235,7 @@ namespace MediaBrowser.Providers.TV } // Examine if there's no local metadata, or save local is on (to get updates) - if (!HasLocalMeta(series) || isForcedRefresh) + if (isForcedRefresh || ConfigurationManager.Configuration.EnableTvDbUpdates || !HasLocalMeta(series)) { var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename); var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml");