ShokoAnime / Shokofin

Repository for Shokofin, a plugin that brings Shoko to Jellyfin.
https://shokoanime.com
MIT License
140 stars 17 forks source link

Subsequent scans split shows apart even is group merging is enabled #62

Closed EraYaN closed 1 month ago

EraYaN commented 1 month ago

Jellyfin version.

10.9.7

Shokofin version.

4.0.1.0

Shoko Server version, release channel, and commit hash.

Version 4.2.2.0 (Dev, 2cd0a0f)

File structure of your Media Library Folder in Jellyfin/Import Folder in Shoko Server.

./Anime/Episode 1.avi

Screenshot of the "library settings" section of the plugin settings.

image Rest is all unchecked in this section

Library Type(s).

Shows

Do the issue persists after creating a library with Shoko set as the only metadata provider? (Now is your time to check if you haven't already.)

Issue

Initial scan correctly creates shows with the Shoko groups (also seems to work if you use "Replace metadata"), subsequent normal (automated scan) splits the shows apart again.

The logs do seem to report the same group for two series:

[2024-07-11 08:11:08.015 +00:00] [INF] [79] Shokofin.Resolvers.ShokoIgnoreRule: Found shoko group "Hagane no Renkinjutsushi" (Series="9",ExtraSeries=[],Group="120")
[2024-07-11 08:11:08.034 +00:00] [INF] [79] Shokofin.Resolvers.ShokoIgnoreRule: Found shoko group "Hagane no Renkinjutsushi" (Series="20",ExtraSeries=[],Group="120")

But they still end up split up.

Stack Trace

No response

revam commented 1 month ago

@EraYaN do you know if this happens to other libraries not managed by Shokofin?

revam commented 1 month ago

i also asked about this on Matrix a while back, but I didn't really get a proper response; https://matrix.to/#/!YOoxJKhsHoXZiIHyBG:matrix.org/$7w8iSQetFIEFBFJh5E_9vJ7HG_Fsn6d__Mzu8Qedzx8?via=matrix.org&via=t2bot.io&via=im.jellyfin.org (Edit: unless we count the 'vaguely remember it's by design' message i got in response.)

EraYaN commented 1 month ago

Alright so it seems to go wrong because the Custom ProviderId get's unset. This causes the UserDataKeys to change and in the PresentationUniqueKey resetting to default (hex version of the internal ID). https://github.com/jellyfin/jellyfin/blob/master/MediaBrowser.Controller/Entities/TV/Series.cs#L80