commit
31763e06d5
|
@ -53,7 +53,8 @@ namespace MediaBrowser.Providers.TV
|
||||||
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||||
Recursive = true
|
Recursive = true,
|
||||||
|
GroupByPresentationUniqueKey = false
|
||||||
|
|
||||||
}).Cast<Series>().ToList();
|
}).Cast<Series>().ToList();
|
||||||
|
|
||||||
|
@ -207,7 +208,8 @@ namespace MediaBrowser.Providers.TV
|
||||||
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
||||||
{
|
{
|
||||||
IncludeItemTypes = new[] { typeof(Series).Name },
|
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||||
Recursive = true
|
Recursive = true,
|
||||||
|
GroupByPresentationUniqueKey = false
|
||||||
|
|
||||||
}).Cast<Series>().ToList();
|
}).Cast<Series>().ToList();
|
||||||
|
|
||||||
|
|
|
@ -175,20 +175,17 @@ namespace MediaBrowser.Providers.TV
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||||
{
|
|
||||||
var episode = (Episode)item;
|
|
||||||
|
|
||||||
if (!episode.IsVirtualUnaired)
|
|
||||||
{
|
{
|
||||||
// For non-unaired items, only enable if configured
|
// For non-unaired items, only enable if configured
|
||||||
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
|
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!item.HasImage(ImageType.Primary))
|
if (!item.HasImage(ImageType.Primary))
|
||||||
{
|
{
|
||||||
|
var episode = (Episode)item;
|
||||||
|
|
||||||
var series = episode.Series;
|
var series = episode.Series;
|
||||||
|
|
||||||
if (series != null && TvdbSeriesProvider.IsValidSeries(series.ProviderIds))
|
if (series != null && TvdbSeriesProvider.IsValidSeries(series.ProviderIds))
|
||||||
|
|
|
@ -146,8 +146,7 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
// Only enable for virtual items
|
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
|
||||||
if (item.LocationType != LocationType.Virtual)
|
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
using CommonIO;
|
using CommonIO;
|
||||||
|
using MediaBrowser.Controller.Entities;
|
||||||
|
|
||||||
namespace MediaBrowser.Providers.TV
|
namespace MediaBrowser.Providers.TV
|
||||||
{
|
{
|
||||||
|
@ -110,9 +111,15 @@ namespace MediaBrowser.Providers.TV
|
||||||
.Select(Path.GetFileName)
|
.Select(Path.GetFileName)
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
var seriesIdsInLibrary = _libraryManager.RootFolder
|
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
||||||
.GetRecursiveChildren(i => i is Series && !string.IsNullOrEmpty(i.GetProviderId(MetadataProviders.Tvdb)))
|
{
|
||||||
.Cast<Series>()
|
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||||
|
Recursive = true,
|
||||||
|
GroupByPresentationUniqueKey = false
|
||||||
|
}).Cast<Series>();
|
||||||
|
|
||||||
|
var seriesIdsInLibrary = seriesList
|
||||||
|
.Where(i => !string.IsNullOrEmpty(i.GetProviderId(MetadataProviders.Tvdb)))
|
||||||
.Select(i => i.GetProviderId(MetadataProviders.Tvdb))
|
.Select(i => i.GetProviderId(MetadataProviders.Tvdb))
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
@ -300,10 +307,17 @@ namespace MediaBrowser.Providers.TV
|
||||||
var list = seriesIds.ToList();
|
var list = seriesIds.ToList();
|
||||||
var numComplete = 0;
|
var numComplete = 0;
|
||||||
|
|
||||||
|
var seriesList = _libraryManager.GetItemList(new InternalItemsQuery()
|
||||||
|
{
|
||||||
|
IncludeItemTypes = new[] { typeof(Series).Name },
|
||||||
|
Recursive = true,
|
||||||
|
GroupByPresentationUniqueKey = false
|
||||||
|
|
||||||
|
}).Cast<Series>();
|
||||||
|
|
||||||
// Gather all series into a lookup by tvdb id
|
// Gather all series into a lookup by tvdb id
|
||||||
var allSeries = _libraryManager.RootFolder
|
var allSeries = seriesList
|
||||||
.GetRecursiveChildren(i => i is Series && !string.IsNullOrEmpty(i.GetProviderId(MetadataProviders.Tvdb)))
|
.Where(i => !string.IsNullOrEmpty(i.GetProviderId(MetadataProviders.Tvdb)))
|
||||||
.Cast<Series>()
|
|
||||||
.ToLookup(i => i.GetProviderId(MetadataProviders.Tvdb));
|
.ToLookup(i => i.GetProviderId(MetadataProviders.Tvdb));
|
||||||
|
|
||||||
foreach (var seriesId in list)
|
foreach (var seriesId in list)
|
||||||
|
|
|
@ -365,14 +365,10 @@ namespace MediaBrowser.Providers.TV
|
||||||
|
|
||||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||||
{
|
{
|
||||||
if (item.LocationType != LocationType.Virtual)
|
|
||||||
{
|
|
||||||
// For non-virtual items, only enable if configured
|
|
||||||
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
|
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var season = (Season)item;
|
var season = (Season)item;
|
||||||
var series = season.Series;
|
var series = season.Series;
|
||||||
|
|
|
@ -2398,6 +2398,11 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (query.User == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (query.IncludeItemTypes.Length == 0)
|
if (query.IncludeItemTypes.Length == 0)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user