Implement Release Parsing, Decision Engine, and Downloading (#35)

* Implement Parsing, Decision Engine, and Downloading
This commit is contained in:
Qstick
2017-08-13 22:58:42 -04:00
committed by GitHub
parent 5556989324
commit 1e4d9480e9
191 changed files with 2604 additions and 2755 deletions
@@ -0,0 +1,35 @@
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Qualities;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace NzbDrone.Core.Parser.Model
{
public class ParsedAlbumInfo
{
public string AlbumTitle { get; set; }
public string ArtistName { get; set; }
public ArtistTitleInfo ArtistTitleInfo { get; set; }
public QualityModel Quality { get; set; }
public string ReleaseDate { get; set; }
public Language Language { get; set; }
public string ReleaseGroup { get; set; }
public string ReleaseHash { get; set; }
public override string ToString()
{
string albumString = "[Unknown Album]";
if (AlbumTitle != null )
{
albumString = string.Format("{0}", AlbumTitle);
}
return string.Format("{0} - {1} {2}", ArtistName, albumString, Quality);
}
}
}
@@ -1,4 +1,4 @@
using System;
using System;
using System.Text;
using NzbDrone.Core.Indexers;
@@ -14,9 +14,9 @@ namespace NzbDrone.Core.Parser.Model
public string CommentUrl { get; set; }
public int IndexerId { get; set; }
public string Indexer { get; set; }
public string Artist { get; set; }
public string Album { get; set; }
public DownloadProtocol DownloadProtocol { get; set; }
public int TvdbId { get; set; }
public int TvRageId { get; set; }
public DateTime PublishDate { get; set; }
public string Origin { get; set; }
@@ -80,8 +80,6 @@ namespace NzbDrone.Core.Parser.Model
stringBuilder.AppendLine("Indexer: " + Indexer ?? "Empty");
stringBuilder.AppendLine("CommentUrl: " + CommentUrl ?? "Empty");
stringBuilder.AppendLine("DownloadProtocol: " + DownloadProtocol ?? "Empty");
stringBuilder.AppendLine("TvdbId: " + TvdbId ?? "Empty");
stringBuilder.AppendLine("TvRageId: " + TvRageId ?? "Empty");
stringBuilder.AppendLine("PublishDate: " + PublishDate ?? "Empty");
return stringBuilder.ToString();
default:
@@ -8,7 +8,7 @@ namespace NzbDrone.Core.Parser.Model
public class RemoteAlbum
{
public ReleaseInfo Release { get; set; }
public ParsedTrackInfo ParsedTrackInfo { get; set; }
public ParsedAlbumInfo ParsedAlbumInfo { get; set; }
public Artist Artist { get; set; }
public List<Album> Albums { get; set; }
public bool DownloadAllowed { get; set; }