diff --git a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs index 6e8531b07b..32345cd095 100644 --- a/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteEpisodeProvider.cs @@ -111,8 +111,8 @@ namespace MediaBrowser.Providers.TV /// true if XXXX, false otherwise protected override bool NeedsRefreshInternal(BaseItem item, BaseProviderInfo providerInfo) { - // Don't proceed if there's local metadata and save local is off, as it's likely from another source - if (HasLocalMeta(item) && !ConfigurationManager.Configuration.SaveLocalMeta) + // Don't proceed if there's local metadata + if (HasLocalMeta(item)) { return false; } @@ -151,12 +151,6 @@ namespace MediaBrowser.Providers.TV /// Task{System.Boolean}. public override async Task FetchAsync(BaseItem item, bool force, CancellationToken cancellationToken) { - // Don't proceed if there's local metadata and save local is off, as it's likely from another source - if (HasLocalMeta(item) && !ConfigurationManager.Configuration.SaveLocalMeta) - { - return false; - } - cancellationToken.ThrowIfCancellationRequested(); var episode = (Episode)item; diff --git a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs index 6bf0a00d93..bb32c488e8 100644 --- a/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/RemoteSeriesProvider.cs @@ -213,7 +213,7 @@ namespace MediaBrowser.Providers.TV var seriesDataPath = GetSeriesDataPath(ConfigurationManager.ApplicationPaths, seriesId); - await FetchSeriesData(series, seriesId, seriesDataPath, cancellationToken).ConfigureAwait(false); + await FetchSeriesData(series, seriesId, seriesDataPath, force, cancellationToken).ConfigureAwait(false); } BaseProviderInfo data; @@ -233,9 +233,10 @@ namespace MediaBrowser.Providers.TV /// The series. /// The series id. /// The series data path. + /// if set to true [is forced refresh]. /// The cancellation token. /// Task{System.Boolean}. - private async Task FetchSeriesData(Series series, string seriesId, string seriesDataPath, CancellationToken cancellationToken) + private async Task FetchSeriesData(Series series, string seriesId, string seriesDataPath, bool isForcedRefresh, CancellationToken cancellationToken) { var files = Directory.EnumerateFiles(seriesDataPath, "*.xml", SearchOption.TopDirectoryOnly).Select(Path.GetFileName).ToArray(); @@ -249,7 +250,7 @@ namespace MediaBrowser.Providers.TV } // Examine if there's no local metadata, or save local is on (to get updates) - if (!HasLocalMeta(series) || ConfigurationManager.Configuration.SaveLocalMeta) + if (!HasLocalMeta(series) || isForcedRefresh) { var seriesXmlPath = Path.Combine(seriesDataPath, seriesXmlFilename); var actorsXmlPath = Path.Combine(seriesDataPath, "actors.xml"); @@ -265,13 +266,6 @@ namespace MediaBrowser.Providers.TV FetchActors(series, actorsDoc, seriesDoc); } - if (ConfigurationManager.Configuration.SaveLocalMeta) - { - //var ms = new MemoryStream(); - //seriesDoc.Save(ms); - - //await _providerManager.SaveToLibraryFilesystem(series, Path.Combine(series.MetaLocation, LocalMetaFileName), ms, cancellationToken).ConfigureAwait(false); - } } }