[Feature Request] Support detecting anime on title metadata
While the usual format of downloaded anime usually includes the anime name (either romaji or english title) in the filename itself, so e.g. Frieren - S1E01.mkv, there's however some provider that distribute anime with a weird formatting, like only episode information on the filename
S01E01-Like a Lone Sword [E2514310].mkv
or just a hard, and unusual filename such as
0Otakudesu_ToniKawa--01_720p.mp4
Do note however that those files have a title metadata inside and the format is
Wistoria-Wand.and.Sword.S01E01.1080p.Dual.Audio.WEBRip.10.bits.DD+.x265-EMBER
However, trackma doesn't extract title metadata for detection, and it would be really helpful to detect if somehow the title metadata is giving a lot more information (which usually do) than the filename
Owh, I'm dumb.
Support for title metadata would be really helpful tho, im changing the title
Which tracker are you currently using and which OS? The mpris tracker prefers the title currently and I think plex and jellyfin do as well. For the strictly file-based ones, suche as inotify and polling, we could probably add metadata inspection via mediafile, an external dependency.
Either way, I occasionally get the opposite situation where the file name is easier to recognize because the title has the episode name in it, so I've been meaning to make a configuration option for it but haven't gotten around to it because it requires touching all UIs, which I've been trying to avoid unless necessary (I personally just use the CLI).
Which tracker are you currently using and which OS?
Arch, auto-detect so it should be using inotify by default
The mpris tracker prefers the title currently and I think plex and jellyfin do as well. For the strictly file-based ones, suche as inotify and polling
Owh yea, I tried with MPRIS (on mpv, using the mpv-mpris plugin) and it detected from the title. Yea, however the inotify—the one that got selected by default when you choose auto detect—is checking on the filename instead of the title metadata
we could probably add metadata inspection via
mediafile, an external dependency.
did you mean mediainfo?
Either way, I occasionally get the opposite situation where the file name is easier to recognize because the title has the episode name in it, so I've been meaning to make a configuration option for it but haven't gotten around to it because it requires touching all UIs, which I've been trying to avoid unless necessary (I personally just use the CLI).
Yea, sometimes the title metadata is used as a... well title. So It'll probably contain something like E01 - Episode Name or something in similar, just like what ani-cli does. (They're using --force-media-title)
But its not always the case, just like these one
So my idea would be, check the filename first, then the title metadata second. As doing such, will gather a lot more info about the video
did you mean
mediainfo?
Yes.
So my idea would be, check the filename first, then the title metadata second.
You mean check the filename if it matches and otherwise check again with the title? That sounds reasonable. However, the tracker code is a bit of spaghetti currently and I would prefer to clean it up before implementing such a retry mechanism (for every tracker that can support it). And cleaning up the code would be better done after we have updated tooling and revised the formatting of the code base because the current one with a column with of what seems like 60 makes me want to shoot myself in the foot whenever I read it and need to refrain from just fixing it to avoid conflicts.
Alas, issue received. Will probably be worked on at some point.
Weird that not all title (I used MPRIS, so Guessing filename is from the title metadata right?) are detected. Take Mushoku Tensei from EMBER group for example
[D] Tracker (MPRIS): Player connected: org.mpris.MediaPlayer2.mpv
[D] Tracker (MPRIS): Guessing filename: Mushoku.Tensei.S01E01.1080p.Dual.Audio.BDRip.10.bits.DD.x265-EMBER
[D] Tracker (MPRIS): Show guess: Mushoku Tensei: None - 1
[D] Tracker (MPRIS): Video not recognized
It said Show guess: Mushoku Tensei but it's failed to recognize
Mushoku Tensei is what it reads from the title. However, it then fails to match this with an entry from your list because the English title is "Mushoku Tensei: Jobless Reincarnation" and the title in Romaji is "Mushoku Tensei: Isekai Ittara Honki Dasu". trackma cannot (currently) match parts of titles, so you'd need to add an altname for this entry as "Mushoku Tensei".
I also run into this every season and I also tried to submit aliases to Anilist, since trackma also attempts to match aliases, but the edits are rejected because Anilist's search itself is unaffected by this limitation since it can match parts of the title (and the user is then tasked with selecting the intended result from a list). I think we could cope a bit by splitting on colons in titles and attempt to match the first part as well, but that's a different issue.
However, it then fails to match this with an entry from your list because the English title is "Mushoku Tensei: Jobless Reincarnation" and the title in Romaji is "Mushoku Tensei: Isekai Ittara Honki Dasu". trackma cannot (currently) match parts of titles, so you'd need to add an altname for this entry as "Mushoku Tensei".
Ok, so currently trackma matches for the Romaji and the English title, but only for the full title. But we can give it an alias using the Change alternate name (didn't know that before).
Oh yeah it does work.
I also run into this every season and I also tried to submit aliases to Anilist, since trackma also attempts to match aliases, but the edits are rejected because Anilist's search itself is unaffected by this limitation since it can match parts of the title (and the user is then tasked with selecting the intended result from a list). I think we could cope a bit by splitting on colons in titles and attempt to match the first part as well, but that's a different issue.
wait you can do that on anilist?
Ahhh this one?
Yes, those are the synonyms that trackma also considers for matching.
I have created https://github.com/z411/trackma/issues/754 for the other topic.
Arch, auto-detect so it should be using inotify by default
Just found out if I play from ani-cli, using inotify, and lsof it can't even detect a video playing at all. Only MPRIS can detect it.
Not meant to necrobump, just want to inform
I occasionally get the opposite situation where the file name is easier to recognize because the title has the episode name in it
Oh yea :) I just encountered it when watching TenSura, weird that the same release group would do different thing (sometimes full anime name on title metadata, sometimes not)
Arch, auto-detect so it should be using inotify by default
Just found out if I play from
ani-cli, using inotify, and lsof it can't even detect a video playing at all. Only MPRIS can detect it.
pretty sure inotify is meant for local files while mpris takes whatever shows up as last playing.
Indeed, the inotify tracker requires physical files while the mpris tracker uses a dbus protocol to listen to currently playing media (by whichever player that provides this protocol, natively or through a plugin).