mirror of
https://github.com/Prowlarr/Prowlarr
synced 2026-04-17 02:10:48 +02:00
parent
09ed132fe6
commit
4dee1d65d1
5 changed files with 20 additions and 4 deletions
|
|
@ -60,6 +60,10 @@ public async Task should_parse_recent_feed_from_AvistaZ()
|
|||
torrentInfo.ImdbId.Should().Be(15569106);
|
||||
torrentInfo.TmdbId.Should().Be(135144);
|
||||
torrentInfo.TvdbId.Should().Be(410548);
|
||||
torrentInfo.Languages.Should().HaveCount(1);
|
||||
torrentInfo.Languages.First().Should().Be("Japanese");
|
||||
torrentInfo.Subs.Should().HaveCount(27);
|
||||
torrentInfo.Subs.First().Should().Be("Arabic");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ from r in Releases
|
|||
new XAttribute("type", protocol == DownloadProtocol.Torrent ? "application/x-bittorrent" : "application/x-nzb")),
|
||||
r.Categories == null ? null : from c in r.Categories select GetNabElement("category", c.Id, protocol),
|
||||
r.IndexerFlags == null ? null : from f in r.IndexerFlags select GetNabElement("tag", f.Name, protocol),
|
||||
r.Languages == null ? null : from c in r.Languages select GetNabElement("language", c.Id, protocol),
|
||||
r.Subs == null ? null : from c in r.Subs select GetNabElement("subs", c.Id, protocol),
|
||||
r.Languages == null ? null : from c in r.Languages select GetNabElement("language", c, protocol),
|
||||
r.Subs == null ? null : from c in r.Subs select GetNabElement("subs", c, protocol),
|
||||
r.Genres == null ? null : GetNabElement("genre", string.Join(", ", r.Genres), protocol),
|
||||
GetNabElement("rageid", r.TvRageId, protocol),
|
||||
GetNabElement("tvdbid", r.TvdbId, protocol),
|
||||
|
|
|
|||
|
|
@ -40,6 +40,14 @@ public class AvistazRelease
|
|||
[JsonProperty(PropertyName = "video_quality")]
|
||||
public string VideoQuality { get; set; }
|
||||
public string Type { get; set; }
|
||||
public List<AvistazLanguage> Audio { get; set; }
|
||||
public List<AvistazLanguage> Subtitle { get; set; }
|
||||
}
|
||||
|
||||
public class AvistazLanguage
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Language { get; set; }
|
||||
}
|
||||
|
||||
public class AvistazResponse
|
||||
|
|
|
|||
|
|
@ -66,6 +66,8 @@ public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
|
|||
UploadVolumeFactor = row.UploadMultiply,
|
||||
MinimumRatio = 1,
|
||||
MinimumSeedTime = 172800, // 48 hours
|
||||
Languages = row.Audio?.Select(x => x.Language).ToList() ?? new List<string>(),
|
||||
Subs = row.Subtitle?.Select(x => x.Language).ToList() ?? new List<string>()
|
||||
};
|
||||
|
||||
if (row.MovieTvinfo != null)
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ public ReleaseInfo()
|
|||
{
|
||||
IndexerFlags = new List<IndexerFlag>();
|
||||
Categories = new List<IndexerCategory>();
|
||||
Languages = new List<string>();
|
||||
Subs = new List<string>();
|
||||
}
|
||||
|
||||
public string Guid { get; set; }
|
||||
|
|
@ -49,8 +51,8 @@ public ReleaseInfo()
|
|||
public string Codec { get; set; }
|
||||
public string Resolution { get; set; }
|
||||
public ICollection<string> Genres { get; set; }
|
||||
public ICollection<Language> Languages { get; set; }
|
||||
public ICollection<Language> Subs { get; set; }
|
||||
public ICollection<string> Languages { get; set; }
|
||||
public ICollection<string> Subs { get; set; }
|
||||
public ICollection<IndexerCategory> Categories { get; set; }
|
||||
public ICollection<IndexerFlag> IndexerFlags { get; set; }
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue