Recently, I've stumbled upon some files that couldn't be processed correctly from Filebot using AniDB scraper
The structure
/path/Noein/01 XXX.mkv
/path/Noein/02 XXX.mkv
/path/Noein/02 XXX.mkv
The problem lies in the folder name. Noein isn't the correct name for the anime for AniDB(i.e. Noein: Mou Hitori no Kimi e)
MediaDetection considers reliable the name only if its length is greater/equal than the found name in AniDb Index.
i.e. Noein <= Noein: Mou Hitori no Kimi e
If the name was found in the episode name, it wouldn't be a problem because filename detection ensures the correct renaming.
So for this particular use case, I modified matchSeriesByName method on MediaDetection.java.
From this
Code: Select all
if (commonName != null && commonName.length >= it.getLenientKey().length && (bestMatch == null || commonName.length > bestMatch.getLenientKey().length))
Code: Select all
if ((commonName != null && (bestMatch == null || commonName.length >= it.getLenientKey().length || (bestMatch != null && commonName.length > bestMatch.getLenientKey().length))))
It's a less strict check but ensures that these glitch won't happen with poorly named anime. Nevertheless, normal detection works as expected.
Here's the gist of the modified code...
https://gist.github.com/anonymous/d6226 ... -java-L498
P.S. Hosting on github filebot source code will help you track issues and pull request more easily
