Cloudbox / autoscan

Autoscan replaces the default Plex and Emby behaviour for picking up changes on the file system.
MIT License
611 stars 55 forks source link

Failed Determining Libraries #198

Closed zod-melodic closed 1 year ago

zod-melodic commented 1 year ago

Hi,

I've been having an ongoing problem with Autoscan where it stops working entirely and returns the "failed determining libraries" error in the logs despite there being no changes to paths, -arr settings, Plex libraries, or anything easily observable.

Autoscan successfully recognizes and catalogs all of my Plex libraries at startup:

Feb 6 22:01:49 DBG Retrieved libraries libraries=[{"ID":5,"Name":"3D Movies","Path":"/mnt/unionfs/azrael/Public/completed newsgroup downloads/3D Movies/"},{"ID":9,"Name":"4K Movies","Path":"/mnt/unionfs/azrael/4K MOVIES/"},{"ID":6,"Name":"Captain's Log","Path":"/mnt/unionfs/azrael/Public/completed newsgroup downloads/pp movies/"},{"ID":7,"Name":"Come and Jump On It","Path":"/mnt/unionfs/azrael/Public/completed newsgroup downloads/zz movies/"},{"ID":1,"Name":"Movies","Path":"/mnt/unionfs/azrael/MOVIES/HD movies/"},{"ID":1,"Name":"Movies","Path":"/mnt/unionfs/azrael/MOVIES/SD movies/"},{"ID":1,"Name":"Movies","Path":"/mnt/unionfs/azrael/NEW MOVIES/"},{"ID":11,"Name":"Wrestling PPVs","Path":"/mnt/unionfs/wrestling/PPV/"},{"ID":10,"Name":"4K TV","Path":"/mnt/unionfs/azrael/4K TV/"},{"ID":2,"Name":"TV Shows","Path":"/mnt/unionfs/azrael/TV/"},{"ID":2,"Name":"TV Shows","Path":"/mnt/unionfs/azrael/NEW TV/"},{"ID":4,"Name":"Wrestling TV","Path":"/mnt/unionfs/wrestling/TV/"}] target=plex url=https://plex.xxx.xxx

But when new files come in, this is the result:

Feb 6 22:18:40 WRN No target libraries found error="/wrestling/TV/WWE RAW: failed determining libraries" target=plex url=https://plex.xxx.xxx

Plex does not update until I run a library update manually.

I know my pathing is correct. I have logging on the most verbose mode, but I'm not able to determine where the failure is occurring.

Any help is appreciated.

martinwholtmon commented 1 year ago

The path must be the same on the plex library and in the request. E.g. Plex: /mnt/unionfs/azrael/MOVIES/HD movies/Superman/ Request:/mnt/unionfs/azrael/MOVIES/HD movies/Superman/

Yours is not. You are missing /mnt/unionfs/ in the autoscan request. I think you can fix this using rewrite in the trigger.

I might add, is's quite strange that you don't have the wrestling library under the azrael directory like the rest. Will probably complicate stuff

zod-melodic commented 1 year ago

I've spent the last three hours picking it apart and it looks like it's a-train that needs the path rewritten as opposed to any of the -arrs. I'll keep tinkering with how to formulate the regex properly to get it to work with a-train. Thanks for the help.