diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-23 01:54:09 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-23 01:54:09 -0500 |
| commit | 8bc4d49c8967f850d0b76ee8896bbc8ce3e50424 (patch) | |
| tree | 50e43b3e815f428de45a80cb2cd505d44a90ae69 /MediaBrowser.Providers | |
| parent | c418f94c98658413ebb078154b7041d3d809ba40 (diff) | |
fix scanning of new libraries
Diffstat (limited to 'MediaBrowser.Providers')
| -rw-r--r-- | MediaBrowser.Providers/Manager/MetadataService.cs | 5 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/EpisodeMetadataService.cs | 49 | ||||
| -rw-r--r-- | MediaBrowser.Providers/TV/SeasonMetadataService.cs | 14 |
3 files changed, 40 insertions, 28 deletions
diff --git a/MediaBrowser.Providers/Manager/MetadataService.cs b/MediaBrowser.Providers/Manager/MetadataService.cs index 0491e800f6..9f8dca4348 100644 --- a/MediaBrowser.Providers/Manager/MetadataService.cs +++ b/MediaBrowser.Providers/Manager/MetadataService.cs @@ -418,6 +418,11 @@ namespace MediaBrowser.Providers.Manager // If any remote providers changed, run them all so that priorities can be honored if (i is IRemoteMetadataProvider) { + if (options.MetadataRefreshMode == MetadataRefreshMode.ValidationOnly) + { + return false; + } + return anyRemoteProvidersChanged; } diff --git a/MediaBrowser.Providers/TV/EpisodeMetadataService.cs b/MediaBrowser.Providers/TV/EpisodeMetadataService.cs index 3de79f779e..2e4271c0f4 100644 --- a/MediaBrowser.Providers/TV/EpisodeMetadataService.cs +++ b/MediaBrowser.Providers/TV/EpisodeMetadataService.cs @@ -20,40 +20,39 @@ namespace MediaBrowser.Providers.TV { var updateType = await base.BeforeSave(item, isFullRefresh, currentUpdateType).ConfigureAwait(false); - if (updateType <= ItemUpdateType.None) + var seriesName = item.FindSeriesName(); + if (!string.Equals(item.SeriesName, seriesName, StringComparison.Ordinal)) { - if (!string.Equals(item.SeriesName, item.FindSeriesName(), StringComparison.Ordinal)) - { - updateType |= ItemUpdateType.MetadataImport; - } + item.SeriesName = seriesName; + updateType |= ItemUpdateType.MetadataImport; } - if (updateType <= ItemUpdateType.None) + + var seriesSortName = item.FindSeriesSortName(); + if (!string.Equals(item.SeriesSortName, seriesSortName, StringComparison.Ordinal)) { - if (!string.Equals(item.SeriesSortName, item.FindSeriesSortName(), StringComparison.Ordinal)) - { - updateType |= ItemUpdateType.MetadataImport; - } + item.SeriesSortName = seriesSortName; + updateType |= ItemUpdateType.MetadataImport; } - if (updateType <= ItemUpdateType.None) + + var seasonName = item.FindSeasonName(); + if (!string.Equals(item.SeasonName, seasonName, StringComparison.Ordinal)) { - if (!string.Equals(item.SeasonName, item.FindSeasonName(), StringComparison.Ordinal)) - { - updateType |= ItemUpdateType.MetadataImport; - } + item.SeasonName = seasonName; + updateType |= ItemUpdateType.MetadataImport; } - if (updateType <= ItemUpdateType.None) + + var seriesId = item.FindSeriesId(); + if (item.SeriesId != seriesId) { - if (item.SeriesId != item.FindSeriesId()) - { - updateType |= ItemUpdateType.MetadataImport; - } + item.SeriesId = seriesId; + updateType |= ItemUpdateType.MetadataImport; } - if (updateType <= ItemUpdateType.None) + + var seasonId = item.FindSeasonId(); + if (item.SeasonId != seasonId) { - if (item.SeasonId != item.FindSeasonId()) - { - updateType |= ItemUpdateType.MetadataImport; - } + item.SeasonId = seasonId; + updateType |= ItemUpdateType.MetadataImport; } return updateType; diff --git a/MediaBrowser.Providers/TV/SeasonMetadataService.cs b/MediaBrowser.Providers/TV/SeasonMetadataService.cs index b973620f1c..81a0c0b4a2 100644 --- a/MediaBrowser.Providers/TV/SeasonMetadataService.cs +++ b/MediaBrowser.Providers/TV/SeasonMetadataService.cs @@ -37,16 +37,24 @@ namespace MediaBrowser.Providers.TV updateType |= SaveIsVirtualItem(item, episodes); } - if (!string.Equals(item.SeriesName, item.FindSeriesName(), StringComparison.Ordinal)) + var seriesName = item.FindSeriesName(); + if (!string.Equals(item.SeriesName, seriesName, StringComparison.Ordinal)) { + item.SeriesName = seriesName; updateType |= ItemUpdateType.MetadataImport; } - if (!string.Equals(item.SeriesSortName, item.FindSeriesSortName(), StringComparison.Ordinal)) + + var seriesSortName = item.FindSeriesSortName(); + if (!string.Equals(item.SeriesSortName, seriesSortName, StringComparison.Ordinal)) { + item.SeriesSortName = seriesSortName; updateType |= ItemUpdateType.MetadataImport; } - if (item.SeriesId != item.FindSeriesId()) + + var seriesId = item.FindSeriesId(); + if (item.SeriesId != seriesId) { + item.SeriesId = seriesId; updateType |= ItemUpdateType.MetadataImport; } |
