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.
29 lines
879 B
29 lines
879 B
10 years ago
|
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; }
|
||
|
|
||
|
public ImageRefreshOptions(IDirectoryService directoryService)
|
||
|
{
|
||
|
ImageRefreshMode = ImageRefreshMode.Default;
|
||
|
DirectoryService = directoryService;
|
||
|
|
||
|
ReplaceImages = new List<ImageType>();
|
||
|
}
|
||
|
|
||
|
public bool IsReplacingImage(ImageType type)
|
||
|
{
|
||
|
return ImageRefreshMode == ImageRefreshMode.FullRefresh &&
|
||
|
(ReplaceAllImages || ReplaceImages.Contains(type));
|
||
|
}
|
||
|
}
|
||
|
}
|