vosmiic / jellyfin-ani-sync

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

Support for shokofin's VFS #117

Closed kattjevfel closed 6 months ago

kattjevfel commented 6 months ago

Describe the bug Shokofin has recently switched to using a virtual file system for managing the files, this makes it so that the library in Jellyfin (e.g. /mnt/Videos/Anime) and the path for each episode (e.g. /var/lib/jellyfin/plugins/Shokofin/VFS/<very long and detailed name>.mkv) is different. This makes Ani-Sync think the item is in a folder it shouldn't monitor, and skips it.

Logs

Apr 06 15:01:13 jellyfin jellyfin[514484]: [15:01:13] [INF] User policy for kattjävel. EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
Apr 06 15:01:13 jellyfin jellyfin[514484]: [15:01:13] [INF] StreamBuilder.BuildVideoItem( Profile=Jellyfin MPV Shim, Path=/var/lib/jellyfin/plugins/Shokofin/VFS/692d38d3-314c-635e-ca6b-789b2d810b1c/Wakako-zake (2015) [Shoko Series=261]/Season 01/Wakako-zake (2015) S01E3 [Shoko Series=261] [Shoko File=3941].mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/936ef11c-cf36-38ad-e67e-5b48a00fd9aa/stream.mkv?MediaSourceId=936ef11ccf3638ade67e5b48a00fd9aa&Static=true&VideoCodec=h264&AudioCodec=flac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=2fb4a92b0cfce2af939d3584a84307ab
Apr 06 15:01:13 jellyfin jellyfin[514484]: [15:01:13] [INF] Playback has started. (File=3941)
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] Playback stopped reported by app Jellyfin MPV Shim 2.6.0 playing Monkfish Liver in Ponzu. Stopped at 123970 ms
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] Playback has ended. (File=3941)
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] Item is in a folder the user does not want to be monitored; ignoring
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] User policy for kattjävel. EnablePlaybackRemuxing: False EnableVideoPlaybackTranscoding: False EnableAudioPlaybackTranscoding: False
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] StreamBuilder.BuildVideoItem( Profile=Jellyfin MPV Shim, Path=/var/lib/jellyfin/plugins/Shokofin/VFS/692d38d3-314c-635e-ca6b-789b2d810b1c/Wakako-zake (2015) [Shoko Series=261]/Season 01/Wakako-zake (2015) S01E4 [Shoko Series=261] [Shoko File=3934].mkv, AudioStreamIndex=null, SubtitleStreamIndex=null ) => ( PlayMethod=DirectPlay, TranscodeReason=0 ) media:/videos/bbda6f52-7fcf-838d-8ff7-42ea6e63c592/stream.mkv?MediaSourceId=bbda6f527fcf838d8ff742ea6e63c592&Static=true&VideoCodec=h264&AudioCodec=flac&AudioStreamIndex=1&SubtitleStreamIndex=2&api_key=<token>&SubtitleMethod=Embed&Tag=2fb4a92b0cfce2af939d3584a84307ab
Apr 06 15:02:50 jellyfin jellyfin[514484]: [15:02:50] [INF] Successfully synced watch state with Shoko. (File=3941)

To Reproduce Steps to reproduce the behavior:

  1. Set up Shoko
  2. Install Shokofin Unstable with VFS (currently 3.0.1.83)
  3. Set up Ani-Sync
  4. Play an episode
  5. Episode does not sync at end, see log above.

Expected behavior Being able to set only a specific library to sync and have it work even with the VFS magic shokofin uses.

Desktop (please complete the following information):

Additional context Unticking all libraries to have it act on them all does work, but is not ideal.

vosmiic commented 6 months ago

I'll be creating a beta version of the plugin with the related fix soon so you don't have to build it yourself