Closed natyusha closed 2 months ago
The main problem right now is trying to find a way to properly map the file to the right place.
Couldn't this be resolved by comparing the parent foldername + filename instead of the full path like in the Plex agent?
var linPath = (@"/anime/009-1/009-1 - 01.mkv");
var linDir = Path.GetFileName(Path.GetDirectoryName(linPath));
var linFil = Path.GetFileName(linPath);
var linPar = Path.Combine(linDir, linFil);
Console.WriteLine(linPar);
Console Output: 009-1/009-1 - 01.mkv
@Cazzar please correct me if I'm wrong but syncing does work for the following cases.
The issue seems to be when Shoko and Plex are on different systems with different OS?
@natyusha that will not work, as it is not the issue at all. The issue itself is the mismatch of the path separator character when plex and shoko are on differing OS systems.
The issue is a low priority ultimately
Resolved here (including parent folders): https://github.com/ShokoAnime/ShokoServer/pull/1176
Thanks to Cazarr recently adding some extra logging in the daily it seems to be confirmed why the Sync Plex Watch Status command is failing to function on certain setups.
VERSION INFORMATION
Server Version: Latest Daily
Desktop Version: Latest Daily
LOG FILE
DESCRIPTION
When running the Sync Plex Watch Status command the entire Plex library is scanned but no watched states make it back to ShokoServer (the episodes are not found). The log excerpt above coupled with the screenshot below (which shows the expected paths) should demonstrate what is going wrong. The file paths need to be converted from their local
M:\Anime\009-1\009-1 - 01.mkv
paths back into their server/anime/009-1/009-1 - 01.mkv
paths for ShokoServer to be able to find the files.STEPS TO REPRODUCE
The above example has Plex installed on Windows alongside ShokoDesktop while ShokoServer is running in a docker container on unRAID.