1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-21 22:05:43 -04:00

New: Add generic TorrentRssIndexer support.

Add support for generic RSS feeds. Parses the feed and tests if it is
EZTV compatible, or if it has all required fields for the generic
TorrentRssParser
This commit is contained in:
Michel Zehnder
2015-02-12 07:42:31 +01:00
committed by Taloth Saldono
parent bbcabf0632
commit 9d7522cc15
26 changed files with 4567 additions and 4 deletions
@@ -3,6 +3,8 @@ using NzbDrone.Core.Indexers;
namespace NzbDrone.Core.Parser.Model
{
using System.Text;
public class ReleaseInfo
{
public String Guid { get; set; }
@@ -56,5 +58,27 @@ namespace NzbDrone.Core.Parser.Model
{
return String.Format("[{0}] {1} [{2}]", PublishDate, Title, Size);
}
public virtual string ToString(string format)
{
switch (format.ToUpperInvariant())
{
case "L": // Long format
var stringBuilder = new StringBuilder();
stringBuilder.AppendLine("Guid: " + Guid ?? "Empty");
stringBuilder.AppendLine("Title: " + Title ?? "Empty");
stringBuilder.AppendLine("Size: " + Size ?? "Empty");
stringBuilder.AppendLine("InfoUrl: " + InfoUrl ?? "Empty");
stringBuilder.AppendLine("DownloadUrl: " + DownloadUrl ?? "Empty");
stringBuilder.AppendLine("Indexer: " + Indexer ?? "Empty");
stringBuilder.AppendLine("CommentUrl: " + CommentUrl ?? "Empty");
stringBuilder.AppendLine("DownloadProtocol: " + DownloadProtocol ?? "Empty");
stringBuilder.AppendLine("TvRageId: " + TvRageId ?? "Empty");
stringBuilder.AppendLine("PublishDate: " + PublishDate ?? "Empty");
return stringBuilder.ToString();
default:
return ToString();
}
}
}
}