2014-02-10 11:39:41 -07:00
|
|
|
|
using System;
|
2014-01-28 11:37:01 -07:00
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.Controller.Providers
|
|
|
|
|
{
|
|
|
|
|
public class MetadataRefreshOptions : ImageRefreshOptions
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// When paired with MetadataRefreshMode=FullRefresh, all existing data will be overwritten with new data from the providers.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool ReplaceAllMetadata { get; set; }
|
|
|
|
|
|
|
|
|
|
public MetadataRefreshMode MetadataRefreshMode { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// TODO: deprecate. Keeping this for now, for api compatibility
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Obsolete]
|
|
|
|
|
public bool ForceSave { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class ImageRefreshOptions
|
|
|
|
|
{
|
2014-01-30 21:50:09 -07:00
|
|
|
|
public ImageRefreshMode ImageRefreshMode { get; set; }
|
2014-02-10 11:39:41 -07:00
|
|
|
|
public IDirectoryService DirectoryService { get; set; }
|
2014-01-30 21:50:09 -07:00
|
|
|
|
|
|
|
|
|
public ImageRefreshOptions()
|
|
|
|
|
{
|
|
|
|
|
ImageRefreshMode = ImageRefreshMode.Default;
|
|
|
|
|
}
|
2014-01-28 11:37:01 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public enum MetadataRefreshMode
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Providers will be executed based on default rules
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
EnsureMetadata = 0,
|
2014-01-28 11:37:01 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// No providers will be executed
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
None = 1,
|
2014-01-28 11:37:01 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// All providers will be executed to search for new metadata
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
FullRefresh = 2,
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The validation only
|
|
|
|
|
/// </summary>
|
|
|
|
|
ValidationOnly = 3
|
2014-01-28 11:37:01 -07:00
|
|
|
|
}
|
2014-01-30 21:50:09 -07:00
|
|
|
|
|
|
|
|
|
public enum ImageRefreshMode
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The default
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
Default = 0,
|
2014-01-30 21:50:09 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Existing images will be validated
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
ValidationOnly = 1,
|
2014-01-30 21:50:09 -07:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// All providers will be executed to search for new metadata
|
|
|
|
|
/// </summary>
|
2014-05-16 21:24:10 -07:00
|
|
|
|
FullRefresh = 2
|
2014-01-30 21:50:09 -07:00
|
|
|
|
}
|
2014-01-28 11:37:01 -07:00
|
|
|
|
}
|