beyond-hd-api: parsing audio and subtitle languages

This commit is contained in:
Bogdan
2025-03-22 21:06:31 +02:00
parent ff4bf651ad
commit 45cb5e4a28

View File

@@ -295,7 +295,9 @@ namespace Jackett.Common.Indexers.Definitions
Size = row.Size, Size = row.Size,
Seeders = row.Seeders, Seeders = row.Seeders,
Peers = row.Leechers + row.Seeders, Peers = row.Leechers + row.Seeders,
PublishDate = DateTime.Parse(row.CreatedAt, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal) PublishDate = DateTime.Parse(row.CreatedAt, CultureInfo.InvariantCulture, DateTimeStyles.AssumeUniversal),
Languages = row.Audios?.Split(',').Select(x => x.Trim()).Where(x => x.IsNotNullOrWhiteSpace()).ToList() ?? new List<string>(),
Subs = row.Subtitles?.Split(',').Select(x => x.Trim()).Where(x => x.IsNotNullOrWhiteSpace()).ToList() ?? new List<string>(),
}; };
if (row.ImdbId.IsNotNullOrWhiteSpace()) if (row.ImdbId.IsNotNullOrWhiteSpace())
@@ -468,12 +470,16 @@ namespace Jackett.Common.Indexers.Definitions
public long Size { get; set; } public long Size { get; set; }
public string Category { get; set; } public string Category { get; set; }
public string Type { get; set; } public string Type { get; set; }
public int Seeders { get; set; }
public int Leechers { get; set; }
[JsonProperty("times_completed")] [JsonProperty("times_completed")]
public int Grabs { get; set; } public int Grabs { get; set; }
public int Seeders { get; set; }
public int Leechers { get; set; }
public string Audios { get; set; }
public string Subtitles { get; set; }
[JsonProperty("imdb_id")] [JsonProperty("imdb_id")]
public string ImdbId { get; set; } public string ImdbId { get; set; }