using System;
namespace MediaBrowser.Controller.Providers
{
public class ProviderResult
{
///
/// Gets or sets the item identifier.
///
/// The item identifier.
public Guid ItemId { get; set; }
///
/// Gets or sets a value indicating whether this instance has refreshed metadata.
///
/// true if this instance has refreshed metadata; otherwise, false.
public bool HasRefreshedMetadata { get; set; }
///
/// Gets or sets a value indicating whether this instance has refreshed images.
///
/// true if this instance has refreshed images; otherwise, false.
public bool HasRefreshedImages { get; set; }
///
/// Gets or sets the date last refreshed.
///
/// The date last refreshed.
public DateTime DateLastRefreshed { get; set; }
///
/// Gets or sets the last result.
///
/// The last result.
public ProviderRefreshStatus Status { get; set; }
///
/// Gets or sets the last result error message.
///
/// The last result error message.
public string ErrorMessage { get; set; }
public void AddStatus(ProviderRefreshStatus status, string errorMessage)
{
if (string.IsNullOrEmpty(ErrorMessage))
{
ErrorMessage = errorMessage;
}
if (Status == ProviderRefreshStatus.Success)
{
Status = status;
}
}
public ProviderResult()
{
Status = ProviderRefreshStatus.Success;
}
}
}