本文整理汇总了C#中IHasMetadata.HasImage方法的典型用法代码示例。如果您正苦于以下问题:C# IHasMetadata.HasImage方法的具体用法?C# IHasMetadata.HasImage怎么用?C# IHasMetadata.HasImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IHasMetadata
的用法示例。
在下文中一共展示了IHasMetadata.HasImage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HasChanged
public bool HasChanged(IHasMetadata item, MetadataStatus status, IDirectoryService directoryService)
{
return GetSupportedImages(item).Any(i => !item.HasImage(i));
}
示例2: HasChanged
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
{
return GetSupportedImages(item).Any(i => !item.HasImage(i));
}
示例3: HasChanged
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService)
{
// For non-unaired items, only enable if configured
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
{
return false;
}
if (!item.HasImage(ImageType.Primary))
{
var episode = (Episode)item;
var series = episode.Series;
if (series != null && TvdbSeriesProvider.IsValidSeries(series.ProviderIds))
{
// Process images
var seriesXmlPath = TvdbSeriesProvider.Current.GetSeriesXmlPath(series.ProviderIds, series.GetPreferredMetadataLanguage());
return _fileSystem.GetLastWriteTimeUtc(seriesXmlPath) > item.DateLastRefreshed;
}
}
return false;
}
示例4: HasChanged
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
{
var episode = (Episode)item;
if (!episode.IsVirtualUnaired)
{
// For non-unaired items, only enable if configured
if (!TvdbSeriesProvider.Current.GetTvDbOptions().EnableAutomaticUpdates)
{
return false;
}
}
if (!item.HasImage(ImageType.Primary))
{
var series = episode.Series;
if (series != null && TvdbSeriesProvider.IsValidSeries(series.ProviderIds))
{
// Process images
var seriesDataPath = TvdbSeriesProvider.GetSeriesDataPath(_config.ApplicationPaths, series.ProviderIds);
var files = TvdbEpisodeProvider.Current.GetEpisodeXmlFiles(episode.ParentIndexNumber, episode.IndexNumber, episode.IndexNumberEnd, seriesDataPath);
return files.Any(i => _fileSystem.GetLastWriteTimeUtc(i) > date);
}
}
return false;
}
示例5: HasChanged
public bool HasChanged(IHasMetadata item, IDirectoryService directoryService, DateTime date)
{
var episode = (Episode)item;
if (!episode.IsVirtualUnaired)
{
// For non-unaired items, only enable if configured
if (!_config.Configuration.EnableTvDbUpdates)
{
return false;
}
}
if (!item.HasImage(ImageType.Primary))
{
var series = episode.Series;
var seriesId = series != null ? series.GetProviderId(MetadataProviders.Tvdb) : null;
if (!string.IsNullOrEmpty(seriesId))
{
// Process images
var seriesDataPath = TvdbSeriesProvider.GetSeriesDataPath(_config.ApplicationPaths, seriesId);
var files = TvdbEpisodeProvider.Current.GetEpisodeXmlFiles(episode.ParentIndexNumber, episode.IndexNumber, episode.IndexNumberEnd, seriesDataPath);
return files.Any(i => _fileSystem.GetLastWriteTimeUtc(i) > date);
}
}
return false;
}