using System;
using System.Collections.Generic;
using MediaBrowser.Model.Entities;
namespace MediaBrowser.Controller.Providers
{
public class MetadataRefreshOptions : ImageRefreshOptions
{
///
/// When paired with MetadataRefreshMode=FullRefresh, all existing data will be overwritten with new data from the providers.
///
public bool ReplaceAllMetadata { get; set; }
public MetadataRefreshMode MetadataRefreshMode { get; set; }
///
/// TODO: deprecate. Keeping this for now, for api compatibility
///
[Obsolete]
public bool ForceSave { get; set; }
}
public class ImageRefreshOptions
{
public ImageRefreshMode ImageRefreshMode { get; set; }
public IDirectoryService DirectoryService { get; set; }
public bool ReplaceAllImages { get; set; }
public List ReplaceImages { get; set; }
public ImageRefreshOptions()
{
ImageRefreshMode = ImageRefreshMode.Default;
ReplaceImages = new List();
}
public bool IsReplacingImage(ImageType type)
{
return ReplaceAllImages || ReplaceImages.Contains(type);
}
}
public enum MetadataRefreshMode
{
///
/// Providers will be executed based on default rules
///
EnsureMetadata = 0,
///
/// No providers will be executed
///
None = 1,
///
/// All providers will be executed to search for new metadata
///
FullRefresh = 2,
///
/// The validation only
///
ValidationOnly = 3
}
public enum ImageRefreshMode
{
///
/// The default
///
Default = 0,
///
/// Existing images will be validated
///
ValidationOnly = 1,
///
/// All providers will be executed to search for new metadata
///
FullRefresh = 2
}
}