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