animebytes: improve season/episode detection for category Anime only

This commit is contained in:
Bogdan
2023-04-22 20:40:29 +03:00
parent 771d936ae7
commit 64ebbbc202

View File

@@ -402,16 +402,18 @@ namespace Jackett.Common.Indexers
properties.Add("BR-DISK"); properties.Add("BR-DISK");
} }
if (!AllowRaws && properties.Any(p => p.StartsWithIgnoreCase("RAW") || p.Contains("BR-DISK"))) if (!AllowRaws &&
categoryName == "Anime" &&
properties.Any(p => p.StartsWithIgnoreCase("RAW") || p.Contains("BR-DISK")))
{ {
continue; continue;
} }
var releaseInfo = categoryName == "Anime" ? "S01" : "";
var editionTitle = torrent.Value<JToken>("EditionData")?.Value<string>("EditionTitle");
int? episode = null;
int? season = null; int? season = null;
int? episode = null;
var releaseInfo = string.Empty;
var editionTitle = torrent.Value<JToken>("EditionData")?.Value<string>("EditionTitle");
if (editionTitle.IsNotNullOrWhiteSpace()) if (editionTitle.IsNotNullOrWhiteSpace())
{ {
@@ -432,7 +434,13 @@ namespace Jackett.Common.Indexers
} }
} }
season ??= ParseSeasonFromTitles(synonyms); if (categoryName == "Anime")
{
season ??= ParseSeasonFromTitles(synonyms);
// Default to S01
season ??= 1;
}
if (season > 0 || episode > 0) if (season > 0 || episode > 0)
{ {