ZeroQI / Absolute-Series-Scanner

Seasons, absolute mode, Subfolders...
1.01k stars 155 forks source link

Overriding season detection in filename #212

Closed ressu closed 5 years ago

ressu commented 5 years ago

I noticed an interesting naming schema in one series. The series name has S3 in it, which makes the scanner detect the filename as S00E00 format, while it really is absolute numbered.

I've tried to trick the scanner to parse it as absolute by defining the season number and offset in the .id file, without any success.

The actual file name is: [HorribleSubs] Shingeki no Kyojin S3 - 50 [720p].mkv

So that should be episode number 50 in the series (which will map into odd things, but at least that is fixable with mappings file)

Is there any way to enforce this at the moment? At least the documentation doesn't seem to have a solution for this.

ZeroQI commented 5 years ago

According AniDB numbering, S3 = Special 3 =s00e03 If your series folder was named "Shingeki no Kyojin S3" or all the files using the same naming convention, there should be no issues as it would remove the S3 to avoid confusion...

ressu commented 5 years ago

Oh, it gets worse. This is actually a full season (well, technically 2 seasons). So the S3 signifies season number. So the file listing in the Season 3 folder has multiple files

[...]
[HorribleSubs] Shingeki no Kyojin S3 - 48 [720p].mkv
[HorribleSubs] Shingeki no Kyojin S3 - 49 [720p].mkv
[HorribleSubs] Shingeki no Kyojin S3 - 50 [720p].mkv
[...]

Those filenames are original filenames from the group. Scanner does a good job at picking up the S3 to signify the season, so at least it's not lumped into specials.

Just to clarify, those files above get parsed onto S03E48, S03E49 and S03E50.

ZeroQI commented 5 years ago

Please attach scanner logs for that series. Location indicated in the readme.

Did you named your series folder 'Shingeki no Kyojin S3' as per my previous post so the scanner remove the title from the filenames hence the problematic 'S3'?

ressu commented 5 years ago

Oh sorry, completely missed the naming suggestion from the previous comment. I will try this and also gather the logs a bit later.

For the naming things are slightly complicated by the fact that this is a Sonarr managed directory, so everything is under Attack on Titan\Season 3 so the directory naming fix will require a bit of juggling (it's still worth trying).

But like I said, I'll follow up with the logs a bit later.

ZeroQI commented 5 years ago

Season 3 is taken from the season folder, since "S3" is present in all filenames, it is ignored As season 3 is a tvdb numbering, the easiest is to put a tvdb.id file with the tvdbid inside "Attack on Titan" series folder possibly

ressu commented 5 years ago

Ok, here are the logs from the runs: logs_fixattempts.zip logs_season3.zip

I attempted renaming the directory to the given name. It's still under the Attack on Titan folder, but as far as I understand that should be a problem, right? Then I added an anidb2.id file to the directory in attempt to force it to read files as absolute numbering, but as seen in the last log entry, it is still not able to pick up the correct combination.

ZeroQI commented 5 years ago

I had a look at scanner logs:

All working as designed...

ressu commented 5 years ago

After quite a bit of trial and error, I managed to get the episode number to transition from S03E50 to S03E13. In the end the solution was to use tvdb2-xxxx-s03e-37. Investigating this also allowed me to understand better what the issue was and I think this feature request is still valid, but the scope is a bit different.

What would have automatically solved the issue was if it was possible to set a mode where the episode numbering followed tvdb absolute numbering but was showed as TVDB Season/Episode format. I understand that this is a rather funky way to number episodes, but that's exactly what we are dealing with here.

ZeroQI commented 5 years ago

wouldn't [tvdb3-xxxx] leave the ep numbering as absolute but put it in seasons and just work if you don't specify season 3 in Attack on Titan\Season 3 ???

ressu commented 5 years ago

According to the documentation it shouldn't and based on quick test, that is true:

"Attack on Titan [tvdb3-267440]" s02e026     (Orig: s01e026    ) "Word Search" "" "[HorribleSubs] Shingeki no Kyojin - 26 [720p].mkv"
"Attack on Titan [tvdb3-267440]" s01e002                         "Word Search" "27" "[HorribleSubs] Shingeki no Kyojin S2 - 27 [720p].mkv"
[...]
"Attack on Titan [tvdb3-267440]" s01e002                         "Word Search" "33" "[HorribleSubs] Shingeki no Kyojin S2 - 33 [720p].mkv"
"Attack on Titan [tvdb3-267440]" s01e002                         "Word Search" "34" "[HorribleSubs] Shingeki no Kyojin S2 - 34 [720p].mkv"
"Attack on Titan [tvdb3-267440]" s01e002                         "Word Search" "35" "[HorribleSubs] Shingeki no Kyojin S2 - 35 [720p].mkv"
[...]
"Attack on Titan [tvdb3-267440]" s01e003                         "Word Search" "41" "[HorribleSubs] Shingeki no Kyojin S3 - 41 [720p].mkv"
"Attack on Titan [tvdb3-267440]" s01e003                         "Word Search" "42" "[HorribleSubs] Shingeki no Kyojin S3 - 42 [720p].mkv"
"Attack on Titan [tvdb3-267440]" s01e003                         "Word Search" "43" "[HorribleSubs] Shingeki no Kyojin S3 - 43 [720p].mkv"

In fact the scanner seems to get even more confused. But I'll admit that it's still faring better than expected considering the challenging naming scheme here.

ZeroQI commented 5 years ago

It that logs from latest ASS ? S2 seen as special 2 or season 2.. Please teat removing that. The scanner can't discard it since not in the series folder name

ressu commented 5 years ago

I updated ASS yesterday.

The file naming is upstream file naming, so I would need to manually rename the files. At least with the season folders I'm able to trick the scanner into ignoring the S2 in the name.

ZeroQI commented 5 years ago

Seem to behave to me exactly as expected you should have the series title match with the S3 and it would scrub it I disagree with "According to the documentation it shouldn't and based on quick test, that is true" since the S2 and S3 disturb the agent behaviour. the first ep of season 2 remapped as expected without "S2" in title: "Attack on Titan [tvdb3-267440]" s02e026 (Orig: s01e026 ) "Word Search" "" "[HorribleSubs] Shingeki no Kyojin - 26 [720p].mkv"

ressu commented 5 years ago

Ok, I see my confusion with the documentation. As it stands currently, it gives the impression that absolute numbering refers to anidb absolute numbering while the code actually appears to use the tvdb absolute numbering as the source. Which is what you were trying to say.

I still wish there was a way to disable the S2/S3 detection bit. Since this is actually part of the series name (and I feel like it's getting more common to have those in series names). I understand that it might be tricky to do this. In any case, I have a workaround for the series. So feel free to close this issue if you don't think it's worth working on.

ZeroQI commented 5 years ago

if you name your folders Shingeki no Kyojin S3/ Shingeki no Kyojin S3 - ep 02 [tags].ext there is no pb but grouping all 3 seasons in the same folder prevent removing s2/s3 since not in the series folder name... If you had 3 series folders matching the filename that get matched to the same tvdb id then it could work but you possibly cannot do that...

Some users use s02 as special 02 following anidb specials numbering and that is officially supported... If i fix it for you i break it for them and i do feel it is tricky in your situation but the file naming is causing the issue so for me it behave as expected.

I will close this ticket as i cannot see how to make it work without impacting a documented naming convention.