New: (Cardigann) More feed metadata for book and music

This commit is contained in:
Qstick 2021-12-05 11:23:47 -06:00
parent 849b3de7d3
commit 579b8a3d3b
3 changed files with 22 additions and 8 deletions

View file

@ -92,11 +92,15 @@ from r in Releases
GetNabElement("rageid", r.TvRageId, protocol),
GetNabElement("tvdbid", r.TvdbId, protocol),
GetNabElement("imdb", r.ImdbId.ToString("D7"), protocol),
GetNabElement("tmdb", r.TmdbId, protocol),
GetNabElement("tmdbid", r.TmdbId, protocol),
GetNabElement("seeders", t.Seeders, protocol),
GetNabElement("files", r.Files, protocol),
GetNabElement("grabs", r.Grabs, protocol),
GetNabElement("peers", t.Peers, protocol),
GetNabElement("author", RemoveInvalidXMLChars(r.Author), protocol),
GetNabElement("booktitle", RemoveInvalidXMLChars(r.BookTitle), protocol),
GetNabElement("artist", RemoveInvalidXMLChars(r.Artist), protocol),
GetNabElement("album", RemoveInvalidXMLChars(r.Album), protocol),
GetNabElement("infohash", RemoveInvalidXMLChars(t.InfoHash), protocol),
GetNabElement("minimumratio", t.MinimumRatio, protocol),
GetNabElement("minimumseedtime", t.MinimumSeedTime, protocol),

View file

@ -561,13 +561,18 @@ private string ParseFields(string value, string fieldName, TorrentInfo release,
value = release.PosterUrl;
break;
//case "author":
// release.Author = value;
// break;
//case "booktitle":
// release.BookTitle = value;
// break;
case "author":
release.Author = value;
break;
case "booktitle":
release.BookTitle = value;
break;
case "artist":
release.Artist = value;
break;
case "album":
release.Album = value;
break;
default:
break;
}

View file

@ -31,6 +31,10 @@ public ReleaseInfo()
public int TvRageId { get; set; }
public int ImdbId { get; set; }
public int TmdbId { get; set; }
public string Author { get; set; }
public string BookTitle { get; set; }
public string Artist { get; set; }
public string Album { get; set; }
public DateTime PublishDate { get; set; }
public string PosterUrl { get; set; }
@ -93,6 +97,7 @@ public virtual string ToString(string format)
stringBuilder.AppendLine("TvdbId: " + TvdbId ?? "Empty");
stringBuilder.AppendLine("TvRageId: " + TvRageId ?? "Empty");
stringBuilder.AppendLine("ImdbId: " + ImdbId ?? "Empty");
stringBuilder.AppendLine("TmdbId: " + TmdbId ?? "Empty");
stringBuilder.AppendLine("PublishDate: " + PublishDate ?? "Empty");
return stringBuilder.ToString();
default: