Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The 'Sync Plex Watch Status' Command Is Not Functioning on Certain Setups #1086

Open
natyusha opened this issue Sep 3, 2023 · 4 comments
Open

Comments

@natyusha
Copy link
Contributor

natyusha commented Sep 3, 2023

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

2023-08-24 14:03:52 Info  | Processing episode Infiltrators of 009-1
2023-08-24 14:03:52 Trace | Episode not found in Shoko, skipping - M:\Anime\009-1\009-1 - 01.mkv (M:\Anime\009-1\009-1 - 01.mkv)

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.

ShokoDesktop_2023-08-24_17-46-27

STEPS TO REPRODUCE

The above example has Plex installed on Windows alongside ShokoDesktop while ShokoServer is running in a docker container on unRAID.

@Cazzar
Copy link
Member

Cazzar commented Sep 4, 2023

The main problem right now is trying to find a way to properly map the file to the right place.

@natyusha
Copy link
Contributor Author

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

@ElementalCrisis
Copy link
Member

@Cazzar please correct me if I'm wrong but syncing does work for the following cases.

  • Shoko and Plex on same system.
  • Shoko and Plex on different systems but same OS.

The issue seems to be when Shoko and Plex are on different systems with different OS?

@Cazzar
Copy link
Member

Cazzar commented Dec 31, 2023

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants