Closed zaraki1311 closed 2 years ago
Hi,
Autoscan does not officially support Windows (although WSL2 is supported). This mainly comes from the fact that we could not land on a solid API design for targets and triggers to be either windows- or unix-based (and to then rewrite the paths accordingly).
While your suggestion makes a lot of sense, I think there are other parts of Autoscan which are not Windows-compatible as well. Think of a scenario where triggers are running on UNIX (Docker) while the Plex server is running on Windows (non-Docker). With that in mind, I will not commit your suggested change as I either want to fully support Windows with Autoscan or not at all. Not some 50/50 support.
Until we fully support Windows, I suggest you to fork the project in the meanwhile.
I'd be interested by this as my PMS also is on windows, if you changed your mind :p
The addition of "/" to all library paths from PLEX if they do not end with a "/" (#102) does not work for PLEX servers running on Windows machines,
This is currently an issue in my setup. I have my "arrs" installed in Docker containers with say "/tv/" as the path. My PLEX server is installed on a Windows machine with the TV folder as "T:\tv".
When Autoscan returns the libraries it is showing TV as having a path of "T:\tv/".
In the triggers I have setup a rewrite of:
In the Targets I have:
Say a request comes in for
/tv/Show/Season 1/Show - s01e01.mkv
the triggers will rename it toT:\\tv/Show/Season 1/Show - s01e01.mkv
This would work if this was the path used for PLEX but it is not. The path used is the one generated from the targets. which is changed toT:\\tv\\Show\\Season 1\\Show - s01e01.mkv
which does not match the section path ofT:\\tv/
If I do not change the / for \ then the path is wrong for plex.a proposed solution would be to add a few extra checks and a ELSE IF.