z411 / trackma

Open multi-site list manager for Unix-like systems. (ex-wMAL)
https://z411.github.io/trackma
GNU General Public License v3.0
761 stars 82 forks source link

Does not recognise anime when scanning folder, but recognises when playing #716

Closed BigBoyBarney closed 9 months ago

BigBoyBarney commented 9 months ago

Hi!

I encountered the following problem. Lots of anime are not recognised during library scan (see screenshot) image

BUT they are recognised via MPRIS when I open them with mpv. (see screenshot) image

I wonder if there is a difference between parsers used in these two scenarios? I checked and there is no metadata pointing to the show other than the filename.

I added a self.msg.debug("Show title to guess: {}".format(show_title)) to _add_show_to_library in engine, and it guesses the wrong title, which explain why it cannot match. image

Thanks in advance! <3

BigBoyBarney commented 9 months ago

It's mostly [Tenrai-Sensei] releases as their naming scheme is a big mess, especially with episode ranges and season nomenclature.

Adding base_filename = filename.rsplit('/', 1)[-1] to https://github.com/z411/trackma/blob/master/trackma/parser/animeinfoextractor.py#L291 fixes this particular issue, but introduces redirection errors due to overflowing episode / season numbers (particularly with Sword Art Online).

I will keep testing different anime and possible additional parsing options, so please keep this issue open to track :)

FichteFoll commented 9 months ago

There is an option to include the folder name when trying to resolve anime titles. The mpris tracker doesn't implement that currently, so it will work as if the setting was disabled. I suggest to disable it globally also for the library scanner.

BigBoyBarney commented 9 months ago

That does indeed fix the issue. Interesting. Thank you!