1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-23 22:25:14 -04:00
Files
Radarr/src/NzbDrone.Core/Parser/Model/ReleaseInfo.cs
T
2014-12-09 20:48:25 -08:00

60 lines
1.7 KiB
C#

using System;
using NzbDrone.Core.Indexers;
namespace NzbDrone.Core.Parser.Model
{
public class ReleaseInfo
{
public String Guid { get; set; }
public String Title { get; set; }
public Int64 Size { get; set; }
public String DownloadUrl { get; set; }
public String InfoUrl { get; set; }
public String CommentUrl { get; set; }
public String Indexer { get; set; }
public DownloadProtocol DownloadProtocol { get; set; }
public Int32 TvRageId { get; set; }
public DateTime PublishDate { get; set; }
public Int32 Age
{
get
{
return DateTime.UtcNow.Subtract(PublishDate).Days;
}
//This prevents manually downloading a release from blowing up in mono
//TODO: Is there a better way?
private set { }
}
public Double AgeHours
{
get
{
return DateTime.UtcNow.Subtract(PublishDate).TotalHours;
}
//This prevents manually downloading a release from blowing up in mono
//TODO: Is there a better way?
private set { }
}
public Double AgeMinutes
{
get
{
return DateTime.UtcNow.Subtract(PublishDate).TotalMinutes;
}
//This prevents manually downloading a release from blowing up in mono
//TODO: Is there a better way?
private set { }
}
public override string ToString()
{
return String.Format("[{0}] {1} [{2}]", PublishDate, Title, Size);
}
}
}