mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-20 11:50:51 +02:00
New: (BeyondHD) Add internal indexer flag
This commit is contained in:
parent
d42649c4df
commit
9b75ba6ca0
2 changed files with 18 additions and 5 deletions
|
|
@ -56,6 +56,10 @@ private IndexerCapabilities SetCapabilities()
|
|||
MovieSearchParams = new List<MovieSearchParam>
|
||||
{
|
||||
MovieSearchParam.Q, MovieSearchParam.ImdbId, MovieSearchParam.TmdbId
|
||||
},
|
||||
Flags = new List<IndexerFlag>
|
||||
{
|
||||
IndexerFlag.Internal
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -237,6 +241,13 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
var tmdbId = row.TmdbId.IsNullOrWhiteSpace() ? 0 : ParseUtil.TryCoerceInt(row.TmdbId.Split("/")[1], out var tmdbResult) ? tmdbResult : 0;
|
||||
var imdbId = ParseUtil.GetImdbId(row.ImdbId).GetValueOrDefault();
|
||||
|
||||
var flags = new HashSet<IndexerFlag>();
|
||||
|
||||
if (row.Internal)
|
||||
{
|
||||
flags.Add(IndexerFlag.Internal);
|
||||
}
|
||||
|
||||
var release = new TorrentInfo
|
||||
{
|
||||
Title = row.Name,
|
||||
|
|
@ -246,6 +257,7 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
Guid = details,
|
||||
Categories = _categories.MapTrackerCatDescToNewznab(row.Category),
|
||||
PublishDate = DateTime.Parse(row.CreatedAt, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal),
|
||||
IndexerFlags = flags,
|
||||
Size = row.Size,
|
||||
Grabs = row.Grabs,
|
||||
Seeders = row.Seeders,
|
||||
|
|
@ -359,5 +371,6 @@ public class BeyondHDTorrent
|
|||
public bool Promo50 { get; set; }
|
||||
public bool Promo75 { get; set; }
|
||||
public bool Limited { get; set; }
|
||||
public bool Internal { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,10 +62,10 @@ public override bool Equals(object obj)
|
|||
return !Equals(left, right);
|
||||
}
|
||||
|
||||
public static IndexerFlag Internal => new IndexerFlag("internal", "Uploader is an internal release group");
|
||||
public static IndexerFlag FreeLeech => new IndexerFlag("freeleech", "Release doesn't count torward ratio");
|
||||
public static IndexerFlag HalfLeech => new IndexerFlag("halfleech", "Release counts 50% to ratio");
|
||||
public static IndexerFlag Scene => new IndexerFlag("scene", "Uploader follows scene rules");
|
||||
public static IndexerFlag DoubleUpload => new IndexerFlag("doubleupload", "Seeding counts double for release");
|
||||
public static IndexerFlag Internal => new ("internal", "Uploader is an internal release group");
|
||||
public static IndexerFlag FreeLeech => new ("freeleech", "Release doesn't count toward ratio");
|
||||
public static IndexerFlag HalfLeech => new ("halfleech", "Release counts 50% to ratio");
|
||||
public static IndexerFlag Scene => new ("scene", "Uploader follows scene rules");
|
||||
public static IndexerFlag DoubleUpload => new ("doubleupload", "Seeding counts double for release");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue