jellyfin-server/MediaBrowser.Controller/Providers/MetadataStatus.cs

82 lines
2.3 KiB
C#
Raw Normal View History

2014-01-29 05:17:58 +00:00
using System;
namespace MediaBrowser.Controller.Providers
{
public class MetadataStatus
{
/// <summary>
/// Gets or sets the item identifier.
/// </summary>
/// <value>The item identifier.</value>
public Guid ItemId { get; set; }
2014-02-08 20:02:35 +00:00
/// <summary>
/// Gets or sets the name of the item.
/// </summary>
/// <value>The name of the item.</value>
public string ItemName { get; set; }
2014-02-08 22:38:02 +00:00
/// <summary>
/// Gets or sets the type of the item.
/// </summary>
/// <value>The type of the item.</value>
public string ItemType { get; set; }
2014-02-08 20:02:35 +00:00
/// <summary>
/// Gets or sets the name of the series.
/// </summary>
/// <value>The name of the series.</value>
public string SeriesName { get; set; }
2014-01-29 05:17:58 +00:00
/// <summary>
/// Gets or sets the date last metadata refresh.
/// </summary>
/// <value>The date last metadata refresh.</value>
public DateTime? DateLastMetadataRefresh { get; set; }
/// <summary>
/// Gets or sets the date last images refresh.
/// </summary>
/// <value>The date last images refresh.</value>
public DateTime? DateLastImagesRefresh { get; set; }
/// <summary>
/// Gets or sets the last result error message.
/// </summary>
/// <value>The last result error message.</value>
public string LastErrorMessage { get; set; }
2014-09-11 01:57:11 +00:00
public DateTime? ItemDateModified { get; set; }
2015-10-05 03:24:24 +00:00
public void AddStatus(string errorMessage)
2014-01-29 05:17:58 +00:00
{
if (string.IsNullOrEmpty(LastErrorMessage))
{
LastErrorMessage = errorMessage;
}
}
public bool IsDirty { get; private set; }
2015-09-10 18:28:22 +00:00
public void SetDateLastMetadataRefresh(DateTime? date)
2014-01-29 05:17:58 +00:00
{
2015-09-10 18:28:22 +00:00
if (date != DateLastMetadataRefresh)
2014-01-29 05:17:58 +00:00
{
IsDirty = true;
}
DateLastMetadataRefresh = date;
}
2015-09-10 18:28:22 +00:00
public void SetDateLastImagesRefresh(DateTime? date)
2014-01-29 05:17:58 +00:00
{
2015-09-10 18:28:22 +00:00
if (date != DateLastImagesRefresh)
2014-01-29 05:17:58 +00:00
{
IsDirty = true;
}
DateLastImagesRefresh = date;
}
}
}