Closed sin3point14 closed 2 weeks ago
changing to Oshi no Ko somehow downloaded the correct ep from SubsPlease as well :O. That's like magic! I'm curious as to how you achieve this, if, you can explain!
The episode number is normalized if an absolute number is detected.
if listEntry.GetMedia().GetCurrentEpisodeCount() != -1 && episode > listEntry.GetMedia().GetCurrentEpisodeCount() {
ad.mu.Lock()
animeMetadata, err := ad.metadataProvider.GetAnimeMetadata(metadata.AnilistPlatform, listEntry.GetMedia().GetID())
if err == nil && animeMetadata.GetOffset() > 0 {
episode = episode - animeMetadata.GetOffset()
}
ad.mu.Unlock()
}
Thanks for the answer, but I found another issue that is probably related to the previous one.
I tried to download konosuba s1, s2, s3 and i think a similar issue happened here. The library parser ended up assigning all eps of s1, s2 to s1 in library and episodes of s3 to s2 in library
The s2 ep1 is also marked as s1 ep1
The s2 scan errors because s2 only has 10 eps and s3 has 11 eps, so it doesn't know what to assign s3 ep11 file to
I will attach the full scan logs 2024-09-20_01-47-10-scan.log
I will manually resolve them for now but I have a gut feeling that it is probably due to the title matcher ignoring "season" again
Btw thanks for the sponsor.
Here's an explanation:
The library scanner does not ignore seasons. The code explicitly generates multiple variations containing seasons (e.g. Season 3
, S3
, 3rd season
) when a season is parsed--which in this case, it was in all instances. You can see that, with the filename Kono ... Shukufuku S3 - 11.mkv
, the matcher found a distance of 1
when comparing it with the media title Kono ... Shukufuku wo! 3
using Levenshtein. i.e., "S" was the only difference.
The issue is that Sorensen-Dice was used as a final threshold and it picked the wrong season. The same thing happened with season 2 being matched to season 1.
The auto-downloader on the other hand behaves differently from the library scanner when comparing titles as it just compares 2 titles. The issue is, as you figured out, the parsed torrent title omits the season, which causes the comparison to fail because the distance is greater.
ABC Season 2
as a comparison title will fail because ABC
is shorter since Season 2
was omitted. Which is why removing Season 2
from the comparison title fixed it. This is a simple fix if like you said, the seasons are matched separately.
Checklist
Bug Severity
Usability is affected
Bug Area
Other
Bug Description / Steps to Reproduce
I have the following setting in autodownloader But unfortunately it didn't download an episode. After digging into the code I figured out that this test reproduces the issue
changing it to
fixes the test. The reason probably is that
seanime_parser.Parse("[Erai-raws] Oshi no Ko 2nd Season - 11 [720p][Multiple Subtitle] [ENG][FRE]")
storesOshi no Ko
inTitle
field ofseanime_parser.Metadata
struct and stores"2"
inSeasonNumber
. However the anilist entry for this https://anilist.co/anime/166531 shows[Oshi no Ko] 2nd Season
andOshi no Ko Season 2
, both contain the season, hence string matching fails. This is the torrent I hoped it would match https://animetosho.org/view/erai-raws-oshi-no-ko-2nd-season-11.n1875103Expected Behavior
IMO
Oshi no Ko 2nd Season
should have matched since the torrent title contained that string.Though using
Oshi no ko
instead ofOshi no ko 2nd Season
isn't a dealbraker for me, things can get weird when a special air along with the main season. I think I've seen that happen several times like, recently, with Sousou no frieren https://anilist.co/anime/154587/Sousou-no-Frieren/ and https://anilist.co/anime/170068/Sousou-no-Frieren--no-Mahou/. Lets say if this was s2,Sousou no frieren
could match both these shows and autodownloader may pick the wrong one. Though in frieren's case this wouldn't have happened since specials are 13 eps and main season was 28 eps, so main season ep count would always be ahead of specials. This may not be the case when frieren s2 drops.I see several options here:
ComparisonTitle
ComparisonTitle
in similar manner, match only the title here and add another step for the season match. Lack of the season in any string(both torrent title andComparisonTitle
) can be treated as season 1Exact match
mode, though this cannot be extended toMost likely
[SubsPlease] Oshi no Ko - 22 (1080p) [3FB8494C].mkv
so maybe I could write some string like[SubsPlease] Oshi no Ko - {ep_number+11} (1080p) [*].mkv
. We can't allow the user to write arbitrary rtemplate/format strings code for security reasons, but you probably get the idea...~ Actually scratch this, changing toOshi no Ko
somehow downloaded the correct ep from SubsPlease as well :O. That's like magic! I'm curious as to how you achieve this, if, you can explain!Screenshots
No response
Logs
I included a test, I think that should be enough for reproduction.
Debugging Checklist
App Version
v2.1.1
Operating System
Linux