2015-03-13 19:37:19 +00:00
|
|
|
using System.Collections.Generic;
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
|
|
{
|
|
|
|
public class ImageRefreshOptions
|
|
|
|
{
|
|
|
|
public ImageRefreshMode ImageRefreshMode { get; set; }
|
|
|
|
public IDirectoryService DirectoryService { get; private set; }
|
|
|
|
|
|
|
|
public bool ReplaceAllImages { get; set; }
|
|
|
|
|
|
|
|
public List<ImageType> ReplaceImages { get; set; }
|
2016-01-23 02:32:14 +00:00
|
|
|
public bool IsAutomated { get; set; }
|
2016-11-17 18:18:19 +00:00
|
|
|
public bool ForceEnableInternetMetadata { get; set; }
|
2015-03-13 19:37:19 +00:00
|
|
|
|
|
|
|
public ImageRefreshOptions(IDirectoryService directoryService)
|
|
|
|
{
|
|
|
|
ImageRefreshMode = ImageRefreshMode.Default;
|
|
|
|
DirectoryService = directoryService;
|
|
|
|
|
|
|
|
ReplaceImages = new List<ImageType>();
|
2016-01-23 02:32:14 +00:00
|
|
|
IsAutomated = true;
|
2015-03-13 19:37:19 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public bool IsReplacingImage(ImageType type)
|
|
|
|
{
|
|
|
|
return ImageRefreshMode == ImageRefreshMode.FullRefresh &&
|
|
|
|
(ReplaceAllImages || ReplaceImages.Contains(type));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|