mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 09:59:06 -07:00
update providers
This commit is contained in:
parent
747518decc
commit
87091b6196
@ -317,6 +317,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if (newAsVideo.VideoType != VideoType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return base.IsValidFromResolver(newItem);
|
||||
|
@ -8,7 +8,7 @@ using CommonIO;
|
||||
|
||||
namespace MediaBrowser.LocalMetadata
|
||||
{
|
||||
public abstract class BaseXmlProvider<T> : ILocalMetadataProvider<T>, IHasChangeMonitor, IHasOrder
|
||||
public abstract class BaseXmlProvider<T> : ILocalMetadataProvider<T>, IHasItemChangeMonitor, IHasOrder
|
||||
where T : IHasMetadata, new()
|
||||
{
|
||||
protected IFileSystem FileSystem;
|
||||
@ -56,7 +56,7 @@ namespace MediaBrowser.LocalMetadata
|
||||
|
||||
protected abstract FileSystemMetadata GetXmlFile(ItemInfo info, IDirectoryService directoryService);
|
||||
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||
{
|
||||
var file = GetXmlFile(new ItemInfo(item), directoryService);
|
||||
|
||||
@ -65,7 +65,7 @@ namespace MediaBrowser.LocalMetadata
|
||||
return false;
|
||||
}
|
||||
|
||||
return file.Exists && FileSystem.GetLastWriteTimeUtc(file) > date;
|
||||
return file.Exists && FileSystem.GetLastWriteTimeUtc(file) > item.DateLastSaved;
|
||||
}
|
||||
|
||||
public string Name
|
||||
|
@ -430,18 +430,18 @@ namespace MediaBrowser.Providers.Manager
|
||||
var providersWithChanges = providers
|
||||
.Where(i =>
|
||||
{
|
||||
var hasChangeMonitor = i as IHasChangeMonitor;
|
||||
if (hasChangeMonitor != null)
|
||||
{
|
||||
return HasChanged(item, hasChangeMonitor, currentItem.DateLastSaved, options.DirectoryService);
|
||||
}
|
||||
|
||||
var hasFileChangeMonitor = i as IHasItemChangeMonitor;
|
||||
if (hasFileChangeMonitor != null)
|
||||
{
|
||||
return HasChanged(item, hasFileChangeMonitor, options.DirectoryService);
|
||||
}
|
||||
|
||||
var hasChangeMonitor = i as IHasChangeMonitor;
|
||||
if (hasChangeMonitor != null)
|
||||
{
|
||||
return HasChanged(item, hasChangeMonitor, currentItem.DateLastSaved, options.DirectoryService);
|
||||
}
|
||||
|
||||
return false;
|
||||
})
|
||||
.ToList();
|
||||
|
@ -17,7 +17,7 @@ using CommonIO;
|
||||
|
||||
namespace MediaBrowser.Providers.TV
|
||||
{
|
||||
public class TvdbEpisodeImageProvider : IRemoteImageProvider, IHasChangeMonitor
|
||||
public class TvdbEpisodeImageProvider : IRemoteImageProvider, IHasItemChangeMonitor
|
||||
{
|
||||
private readonly IServerConfigurationManager _config;
|
||||
private readonly CultureInfo _usCulture = new CultureInfo("en-US");
|
||||
@ -174,7 +174,7 @@ namespace MediaBrowser.Providers.TV
|
||||
});
|
||||
}
|
||||
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||
{
|
||||
var episode = (Episode)item;
|
||||
|
||||
@ -196,7 +196,7 @@ namespace MediaBrowser.Providers.TV
|
||||
// Process images
|
||||
var seriesXmlPath = TvdbSeriesProvider.Current.GetSeriesXmlPath(series.ProviderIds, series.GetPreferredMetadataLanguage());
|
||||
|
||||
return _fileSystem.GetLastWriteTimeUtc(seriesXmlPath) > date;
|
||||
return _fileSystem.GetLastWriteTimeUtc(seriesXmlPath) > item.DateLastRefreshed;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace MediaBrowser.Providers.TV
|
||||
/// <summary>
|
||||
/// Class RemoteEpisodeProvider
|
||||
/// </summary>
|
||||
class TvdbEpisodeProvider : IRemoteMetadataProvider<Episode, EpisodeInfo>, IItemIdentityProvider<EpisodeInfo>, IHasChangeMonitor
|
||||
class TvdbEpisodeProvider : IRemoteMetadataProvider<Episode, EpisodeInfo>, IItemIdentityProvider<EpisodeInfo>, IHasItemChangeMonitor
|
||||
{
|
||||
private static readonly string FullIdKey = MetadataProviders.Tvdb + "-Full";
|
||||
|
||||
@ -144,7 +144,7 @@ namespace MediaBrowser.Providers.TV
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||
{
|
||||
// Only enable for virtual items
|
||||
if (item.LocationType != LocationType.Virtual)
|
||||
@ -160,7 +160,7 @@ namespace MediaBrowser.Providers.TV
|
||||
// Process images
|
||||
var seriesXmlPath = TvdbSeriesProvider.Current.GetSeriesXmlPath(series.ProviderIds, series.GetPreferredMetadataLanguage());
|
||||
|
||||
return _fileSystem.GetLastWriteTimeUtc(seriesXmlPath) > date;
|
||||
return _fileSystem.GetLastWriteTimeUtc(seriesXmlPath) > item.DateLastRefreshed;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -17,7 +17,7 @@ using MediaBrowser.Model.Configuration;
|
||||
|
||||
namespace MediaBrowser.Server.Implementations.Photos
|
||||
{
|
||||
public abstract class BaseDynamicImageProvider<T> : IHasChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder
|
||||
public abstract class BaseDynamicImageProvider<T> : IHasItemChangeMonitor, IForcedProvider, ICustomMetadataProvider<T>, IHasOrder
|
||||
where T : IHasMetadata
|
||||
{
|
||||
protected IFileSystem FileSystem { get; private set; }
|
||||
@ -247,7 +247,7 @@ namespace MediaBrowser.Server.Implementations.Photos
|
||||
get { return 7; }
|
||||
}
|
||||
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryServicee)
|
||||
{
|
||||
if (!Supports(item))
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ using CommonIO;
|
||||
|
||||
namespace MediaBrowser.XbmcMetadata.Providers
|
||||
{
|
||||
public abstract class BaseNfoProvider<T> : ILocalMetadataProvider<T>, IHasChangeMonitor
|
||||
public abstract class BaseNfoProvider<T> : ILocalMetadataProvider<T>, IHasItemChangeMonitor
|
||||
where T : IHasMetadata, new()
|
||||
{
|
||||
protected IFileSystem FileSystem;
|
||||
@ -57,7 +57,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
||||
|
||||
protected abstract FileSystemMetadata GetXmlFile(ItemInfo info, IDirectoryService directoryService);
|
||||
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
|
||||
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
|
||||
{
|
||||
var file = GetXmlFile(new ItemInfo(item), directoryService);
|
||||
|
||||
@ -66,7 +66,7 @@ namespace MediaBrowser.XbmcMetadata.Providers
|
||||
return false;
|
||||
}
|
||||
|
||||
return file.Exists && FileSystem.GetLastWriteTimeUtc(file) > date;
|
||||
return file.Exists && FileSystem.GetLastWriteTimeUtc(file) > item.DateLastSaved;
|
||||
}
|
||||
|
||||
public string Name
|
||||
|
Loading…
Reference in New Issue
Block a user