update default image providers

This commit is contained in:
Luke Pulverenti
2015-03-13 15:37:19 -04:00
parent e7d5532bee
commit caadb4f374
63 changed files with 757 additions and 585 deletions

View File

@@ -1,6 +1,4 @@
using MediaBrowser.Model.Entities;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
namespace MediaBrowser.Controller.Providers
{
@@ -40,74 +38,4 @@ namespace MediaBrowser.Controller.Providers
ReplaceImages = copy.ReplaceImages.ToList();
}
}
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));
}
}
public enum MetadataRefreshMode
{
/// <summary>
/// The none
/// </summary>
None = 0,
/// <summary>
/// The validation only
/// </summary>
ValidationOnly = 1,
/// <summary>
/// Providers will be executed based on default rules
/// </summary>
Default = 2,
/// <summary>
/// All providers will be executed to search for new metadata
/// </summary>
FullRefresh = 3
}
public enum ImageRefreshMode
{
/// <summary>
/// The none
/// </summary>
None = 0,
/// <summary>
/// The default
/// </summary>
Default = 1,
/// <summary>
/// Existing images will be validated
/// </summary>
ValidationOnly = 2,
/// <summary>
/// All providers will be executed to search for new metadata
/// </summary>
FullRefresh = 3
}
}