Morethan category mapping

This commit is contained in:
Kayomani
2015-08-13 23:41:21 +01:00
parent d9c3fd6b62
commit aee521f37a

View File

@@ -35,7 +35,8 @@ namespace Jackett.Indexers
: base(name: "MoreThanTV",
description: "ROMANIAN Private Torrent Tracker for TV / MOVIES, and the internal tracker for the release group DRACULA.",
link: "https://www.morethan.tv/",
caps: TorznabUtil.CreateDefaultTorznabTVCaps(),
caps: new TorznabCapabilities(TorznabCatType.TV,
TorznabCatType.Movies),
manager: i,
client: c,
logger: l,
@@ -72,6 +73,16 @@ namespace Jackett.Indexers
release.Peers = (int)r["leechers"] + release.Seeders;
release.Guid = new Uri(GuidUrl + id);
release.Comments = release.Guid;
if ((string)r["category"] == "TV")
{
release.Category = TorznabCatType.TV.ID;
}
else if ((string)r["category"] == "Movies")
{
release.Category = TorznabCatType.Movies.ID;
}
release.Link = new Uri(DownloadUrl + id);
}