Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
3b5ae2c
commit e347d38
Showing
4 changed files
with
82 additions
and
275 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
using System.Collections.Generic; | ||
using System.Diagnostics.CodeAnalysis; | ||
using System.Threading.Tasks; | ||
using Jackett.Common.Indexers.Abstract; | ||
using Jackett.Common.Models; | ||
using Jackett.Common.Services.Interfaces; | ||
using Jackett.Common.Utils.Clients; | ||
using Newtonsoft.Json.Linq; | ||
using NLog; | ||
|
||
namespace Jackett.Common.Indexers | ||
{ | ||
[ExcludeFromCodeCoverage] | ||
public class DesiTorrents : GazelleTracker | ||
{ | ||
public DesiTorrents(IIndexerConfigurationService configService, WebClient wc, Logger l, IProtectionService ps, | ||
ICacheService cs) | ||
: base(id: "desitorrents", | ||
name: "DesiTorrents", | ||
description: "Desitorrents is a Private Torrent Tracker for BOLLYWOOD / TOLLYWOOD / GENERAL", | ||
link: "https://desitorrents.tv/", | ||
caps: new TorznabCapabilities | ||
{ | ||
TvSearchParams = new List<TvSearchParam> | ||
{ | ||
TvSearchParam.Q, TvSearchParam.Season, TvSearchParam.Ep | ||
}, | ||
MovieSearchParams = new List<MovieSearchParam> | ||
{ | ||
MovieSearchParam.Q | ||
}, | ||
MusicSearchParams = new List<MusicSearchParam> | ||
{ | ||
MusicSearchParam.Q | ||
}, | ||
BookSearchParams = new List<BookSearchParam> | ||
{ | ||
BookSearchParam.Q | ||
} | ||
}, | ||
configService: configService, | ||
client: wc, | ||
logger: l, | ||
p: ps, | ||
cs: cs, | ||
supportsFreeleechTokens: false, | ||
has2Fa: true | ||
) | ||
{ | ||
Language = "en-us"; | ||
Type = "private"; | ||
|
||
AddCategoryMapping(1, TorznabCatType.Movies, "Movies"); | ||
AddCategoryMapping(2, TorznabCatType.TV, "Tv shows"); | ||
AddCategoryMapping(3, TorznabCatType.Audio, "Music"); | ||
AddCategoryMapping(4, TorznabCatType.BooksEBook, "ebooks"); | ||
AddCategoryMapping(5, TorznabCatType.TVSport, "Sports"); | ||
AddCategoryMapping(6, TorznabCatType.PCGames, "Games"); | ||
} | ||
|
||
protected override async Task<IEnumerable<ReleaseInfo>> PerformQuery(TorznabQuery query) | ||
{ | ||
var releases = await base.PerformQuery(query); | ||
foreach (var release in releases) | ||
{ | ||
release.MinimumRatio = 0.6; | ||
release.MinimumSeedTime = 259200; | ||
} | ||
return releases; | ||
} | ||
|
||
protected override bool ReleaseInfoPostParse(ReleaseInfo release, JObject torrent, JObject result) | ||
{ | ||
// Add missing category information | ||
var category = (string)result["category"]; | ||
release.Category = MapTrackerCatToNewznab(category); | ||
return true; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so you're dropping any poster that does not have a full url?
it's not uncommon for some sites to require the indexer to prefix the sitelink to provided links, so I would have gone for something like:
and thus cater for either.
note: untested, may need refinement, but you get the gist.