vosmiic / jellyfin-ani-sync

Synchronize anime watch status between Jellyfin and anime tracking sites.
GNU General Public License v3.0
266 stars 22 forks source link

TVDB Episode translation to MAL or Anilist #128

Open Arlind-dev opened 6 months ago

Arlind-dev commented 6 months ago

Describe the bug For anime series that are divided into seasons on TheTVDB but treated as a single entry on MAL or AniList, such as Naruto, Bleach, and One Piece, etc., it causes issues.

This also happens with series like Haikyuu Season 4, which is split into Part 1 and Part 2. (I think that's harder to fix though since there are differences in MAL and Anilist in that case)

Even though the anime list repository is accurate, the problem persists. Is there an unknown limitation in how the system detects anime that could be causing this issue?

Logs

[INF] [89] jellyfin_ani_sync.UpdateProviderStatus: (Tvdb) Anime reference found in anime list XML
[INF] [89] jellyfin_ani_sync.UpdateProviderStatus: (Tvdb) Anime Bleach found in anime XML file, detected AniDB ID 2369
[INF] [89] jellyfin_ani_sync.UpdateProviderStatus: Retrieving provider IDs from offline database...
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: Retrieved provider IDs
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: Using provider Mal...
[INF] [66] jellyfin_ani_sync.Api.MalApiCalls: Retrieving an anime from MAL (GET https://api.myanimelist.net/v2/anime/269?fields=title%2Crelated_anime%2Cmy_list_status%2Cnum_episodes)...
[INF] [66] jellyfin_ani_sync.Api.MalApiCalls: Anime retrieval complete
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Series (Bleach) found on watching list
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Provider reports episode already watched; not updating
[ERR] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Could not update anime status
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: Using provider AniList...
[INF] [100] jellyfin_ani_sync.UpdateProviderStatus: User does not have plan to watch only ticked
[INF] [100] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Series (Bleach) found, but provider reports episode already watched. Skipping
[INF] [100] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Series (Bleach) found on Plan_to_watch list
[INF] [100] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Provider reports episode already watched; not updating
[ERR] [100] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Could not update anime status
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: (Tvdb) Anime reference found in anime list XML
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: (Tvdb) Anime Bleach found in anime XML file, detected AniDB ID 2369
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: Retrieving provider IDs from offline database...
[INF] [102] jellyfin_ani_sync.UpdateProviderStatus: Retrieved provider IDs
[INF] [102] jellyfin_ani_sync.UpdateProviderStatus: Using provider Mal...
[INF] [102] jellyfin_ani_sync.Api.MalApiCalls: Retrieving an anime from MAL (GET https://api.myanimelist.net/v2/anime/269?fields=title%2Crelated_anime%2Cmy_list_status%2Cnum_episodes)...
[INF] [66] jellyfin_ani_sync.Api.MalApiCalls: Anime retrieval complete
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Series (Bleach) found on watching list
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Provider reports episode already watched; not updating
[ERR] [66] jellyfin_ani_sync.UpdateProviderStatus: (Mal) Could not update anime status
[INF] [66] jellyfin_ani_sync.UpdateProviderStatus: Using provider AniList...
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: User does not have plan to watch only ticked
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Series (Bleach) found, but provider reports episode already watched. Skipping
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Series (Bleach) found on Plan_to_watch list
[INF] [90] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Provider reports episode already watched; not updating
[ERR] [90] jellyfin_ani_sync.UpdateProviderStatus: (AniList) Could not update anime status

To Reproduce Steps to reproduce the behavior:

  1. Watch an episode that uses TVDB metadata that is not Season 1, where Season X is part of the same MAL or Anilist entry as Season 1 (e.g., Naruto, Bleach, One Piece).
  2. Finish Episode
  3. See error

Expected behavior When using TVDB, the system should reference the anime list repository to get the absolute episode number and send that to MAL or Anilist. (I think)

Desktop (please complete the following information):

Additional context I understand that we are not supposed to create issues for individual shows, but I believe this is a fundamental error. I wanted to share this in case it's helpful. If you think this is just a duplicate of other errors, feel free to close it.

vosmiic commented 6 months ago

We have had many issues with shows that have "awkward" episode/season numbering, and I have tried to fix this many times. I can take another look at it, the solution may be to integrate Shokofin plugin with this plugin (which I will be looking into doing) since it should provide more accurate detection of the effected shows. Thanks for raising though, I'll keep this issue open to remind me to look into it.

botagas commented 4 months ago

This might be related, but I've recently watched The Misfit of Demon King Academy. On Sonarr (TVDB), it's recognised as having Season 1 and 2. Meanwhile in AniList/AniDB/MAL, the second season is split into two separate entries. I haven't tried syncing to anything else than MAL, but what happens with such odd anime is that it won't update even if you provide the AniDB ID manually to the metadata of the individual episodes. In fact, episode information is only provided by TVDB in these cases because AniDB/AniList/etc. have the shows split into separate entries. If it would be possible to translate theTVDB episodes to MAL/AniList/AniDB or something of the sort, that would essentially fix the issue imo.

Kunal926 commented 1 week ago

Any update on this? I am facing same issue with onepiece

Arlind-dev commented 19 hours ago

Any update on this? I am facing same issue with onepiece

I’ve managed to fix it by setting up ShokoServer with Shokofin and using a fork of the jellyfin-ani-sync plugin. It takes a lot of work to get everything running, but it resolves most of the anime detection problems.

Here are the resources to what I used:

It’s worth noting that setting up Shoko might be a good idea in the long run, as vosmiic has mentioned plans to add support for it.

Not the easiest solution, but it works well enough. Hope this helps.