jellyfin / jellyfin-plugin-anidb

This plugin adds the metadata provider for aniDB to Jellyfin
GNU General Public License v2.0
36 stars 14 forks source link

Episode not added to Season #60

Closed Sundava closed 1 year ago

Sundava commented 1 year ago

Some episodes are not properly added to a show or a season, even when placed in the correct folder with a similar filename to other episodes.

For instance, this episode of Goblin Slayer (S02E02):

S02E02 ![image](https://github.com/jellyfin/jellyfin-plugin-anidb/assets/7022870/120e83a6-340b-4596-96c5-eb01d2bea72a)

Does not appear in the Season:

Season 2 ![image](https://github.com/jellyfin/jellyfin-plugin-anidb/assets/7022870/dc58f258-f936-4a94-8693-e376f4dd216c)

The filename is the same format as the S02E01 which was properly identified: image

Contents of the .nfo generated:

[SubsPlease] Goblin Slayer S2 - 01 (1080p) [23637EF6].nfo ``` false 2023-10-07 01:42:47 An Ordinary Spring Day 0 2023 tt20896366 9040106 24 /home/multimedia/Downloads/Animes/Goblin Slayer/Season 2/metadata/[SubsPlease] Goblin Slayer S2 - 01 (1080p) [23637EF6].jpg Yuuichirou Umehara Goblin Slayer (voice) Actor 0 /var/lib/jellyfin/metadata/People/Y/Yuuichirou Umehara/folder.jpg Yui Ogura Priestess (voice) Actor 1 /var/lib/jellyfin/metadata/People/Y/Yui Ogura/folder.jpg Nao Toyama High Elf Archer (voice) Actor 2 /var/lib/jellyfin/metadata/People/N/Nao Toyama/folder.jpg Yuka Iguchi Cow Girl (voice) Actor 3 /var/lib/jellyfin/metadata/People/Y/Yuka Iguchi/folder.jpg Maaya Uchida Guild Girl (voice) Actor 4 /var/lib/jellyfin/metadata/People/M/Maaya Uchida/folder.jpg Yuichi Nakamura Dwarf Shaman (voice) Actor 5 /var/lib/jellyfin/metadata/People/Y/Yuichi Nakamura/folder.jpg Tomokazu Sugita Lizard Priest (voice) Actor 6 /var/lib/jellyfin/metadata/People/T/Tomokazu Sugita/folder.jpg Yoko Hikasa Witch (voice) Actor 7 /var/lib/jellyfin/metadata/People/Y/Yoko Hikasa/folder.jpg Yoshitsugu Matsuoka Spearman (voice) Actor 8 /var/lib/jellyfin/metadata/People/Y/Yoshitsugu Matsuoka/folder.jpg Aya Endo Sword Maiden (voice) Actor 9 /var/lib/jellyfin/metadata/People/A/Aya Endo/folder.jpg Goblin Slayer 1 2 2023-10-06 ass ass eng progressive True False ```
[SubsPlease] Goblin Slayer S2 - 02 (1080p) [65A01B7B].nfo ``` false 2023-10-13 19:06:16 Goblin Slayer S2 en ass ass eng progressive True False ```

I see to remember that identification and categorization in Shows/Seasons was based on the path and the filename, so why is Jellyfin properly identifying the first episode but not the second ?

nalsai commented 1 year ago

1. limitation of AniDB

I am afraid, I have to tell you that the AniDB Plugin currently does not support Seasons (and probably never will in the way that you would expect). This is due to AniDB listing each season as a separate entry without any way to easily identify which season of which series the current entry corresponds to. Example: https://anidb.net/anime/13831 is "Goblin Slayer" https://anidb.net/anime/16027 is "Goblin Slayer II" (there is no way to identify it as "Goblin Slayer" Season 2 using just AniDB, except for guessing it from the title)

Therefore this plugin treats each entry on AniDB as a separate show.

2. how to get proper metadata

The AniDB simply uses the name of the show, season number and episode number parsed by the Jellyfin server to identify files.

By default only season 1 of a show gets identified to prevent issues when people do not know about the limitation in identifying seasons. In the plugin settings you can enable "Ignore Season". This means that you could have folders and files like this and everything would get proper metadata: Goblin Slayer/E01 Goblin Slayer/S01E01 Goblin Slayer II/E01 Goblin Slayer II/S02E01 Goblin Slayer II/Season 2/E01

3. regarding your described experience

I do not see the anidbid in your NFO of episode one — only imdbid and tvdbid. This indicates this plugin not having anything to do with it, as the metadata is coming from IMDb and TheTVDB. This is also what is expected based on the behavior described earlier.

The episode not appearing in season 2 at all is because of either the server itself or another plugin. As you have the file in a "Season 2" folder and the filename is not weird, the server should definitely put it in season 2, so, unless there is some bug in the server, I would guess, that some other plugin is doing weird things.

Side note: I don't recommend using different metadata providers together with AniDB, as due to the limitation mix-ups can happen easily and it is possible to get all metadata one would usually want (except for maybe a banner image) using only AniDB.

4. regarding your described experience — part 2

Episode 2 of Goblin Slayer II aired recently and as metadata on these databases has to be filled in by volunteers after they get the information, it usually takes a little after the episode has aired until one can get the metadata for it. This can be further delayed by caching, so even after the data has appeared on the website of the database it might take a while.

With newly airing episodes you have to "Search for missing metadata" sometimes, as no database can always perfectly get the metadata before you get the file.

Personally, I just live with files sometimes not having proper metadata and click "Search for missing metadata" if it bothers me. Once the show has finished releasing I can just "Search for missing metadata" for everything and then it will usually work. (You can set Jellyfin to automatically refresh metadata, but that can easily get you into trouble with AniDB's very aggressive rate limiting, if you have a large library)

5. alternative: shoko

If you don't mind setting up another service, you can install Shoko and use its Jellyfin plugin instead of this plugin. Shoko hashes the files themselves and can therefore identify them regardless of their location or what the Jellyfin server can identify. It also supports specials and other files much better than this plugin.


TLDR

This plugin doesn't have anything to do with your issue, as it ignores seasons other than season 1 by default. This is confirmed by the NFO files. I'd recommend you to either use Shoko or restructure your library so every season has its own folder. Also, using only one metadata provider can make managing your anime library less of a headache.

Sundava commented 1 year ago

Thank you very much for the detailed help! I'll give shoko a try, as I'd rather keep the folder structure as-is