You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Providers/ImageRefreshOptions.cs

37 lines
1007 B

#pragma warning disable CA1819, CS1591
6 years ago
using System;
using System.Linq;
using MediaBrowser.Model.Entities;
6 years ago
namespace MediaBrowser.Controller.Providers
{
public class ImageRefreshOptions
{
public ImageRefreshOptions(IDirectoryService directoryService)
{
ImageRefreshMode = MetadataRefreshMode.Default;
DirectoryService = directoryService;
ReplaceImages = Array.Empty<ImageType>();
IsAutomated = true;
}
6 years ago
public MetadataRefreshMode ImageRefreshMode { get; set; }
6 years ago
public IDirectoryService DirectoryService { get; private set; }
public bool ReplaceAllImages { get; set; }
public ImageType[] ReplaceImages { get; set; }
6 years ago
public bool IsAutomated { get; set; }
public bool IsReplacingImage(ImageType type)
{
return ImageRefreshMode == MetadataRefreshMode.FullRefresh &&
(ReplaceAllImages || ReplaceImages.Contains(type));
}
}
6 years ago
}