Cloudbox / autoscan

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

No Target Libraries Found After Adding Second Path #147

Closed hwwilliams closed 2 years ago

hwwilliams commented 2 years ago

I'm in the process of moving some files for Plex across to another filesystem, I was trying to cause as little downtime for missing files in Plex as possible by mounting both the old and the new directory inside the Plex library but whenever Autoscan needs to process a scan request on the new path it says that no target libraries are found and I assume that means it failed to find a library in Plex with that new path but I do have libraries with the Path so I'm not sure what's going on.

I was looking for some clarification on whether Autoscan even supports sending scan requests to libraries with multiple paths or if this is a different issue as I don't understand what the error actually means.

The warning/error as shown in docker logs, the errors are coming from events triggered by Sonarr.

image

These are the paths configured in Plex for the library I'm working with.

image

My config is shown below where I didn't need rewrites before because sonarr/radarr/plex/autoscan are all in docker containers that mount the data inside the same directories (i.e. Sonarr, Plex, and Autoscan containers all have /data/tv and /mergerfs/tv mounted inside them), this config was working perfectly prior to adding the /mergerfs/tv paths. Autoscan still processes the /data/tv scan requests successfully during these failures which makes me think that Autoscan does work fine with Plex libraries that have multiple paths but I'm still not sure why it would say it found no target libraries.

anchors: [/data/movies/.movies.anchor, /data/tv/.tv.anchor, /mergerfs/tv/.tv.anchor]                                                                                                                                                                                                         

triggers:                                                                                                                                                                                                                                                                                    
  inotify:                                                                                                                                                                                                                                                                                   
    - priority: 0                                                                                                                                                                                                                                                                            
      paths:                                                                                                                                                                                                                                                                                 
        - path: /data/movies/                                                                                                                                                                                                                                                                
        - path: /data/tv/                                                                                                                                                                                                                                                                    
        - path: /mergerfs/tv/                                                                                                                                                                                                                                                                
      include: []                                                                                                                                                                                                                                                                            
      exclude:                                                                                                                                                                                                                                                                               
        - '.Recycle.Bin/'                                                                                                                                                                                                                                                                    

  radarr:                                                                                                                                                                                                                                                                                    
    - name: radarr                                                                                                                                                                                                                                                                           
      priority: 0                                                                                                                                                                                                                                                                            

    - name: radarr-4k                                                                                                                                                                                                                                                                        
      priority: 1                                                                                                                                                                                                                                                                            

  sonarr:                                                                                                                                                                                                                                                                                    
    - name: sonarr                                                                                                                                                                                                                                                                           
      priority: 0                                                                                                                                                                                                                                                                            

    - name: sonarr-4k                                                                                                                                                                                                                                                                        
      priority: 1                                                                                                                                                                                                                                                                            

targets:                                                                                                                                                                                                                                                                                     
  plex:                                                                                                                                                                                                                                                                                      
    - url: http://localhost:32400                                                                                                                                                                                                                                                            
      token: XXXXXXXXXXX

Any help would be appreciated.

hwwilliams commented 2 years ago

I have enabled debug verbosity on the Autoscan container and now see this line for retrieved libraries

DBG Retrieved libraries libraries=[{"ID":6,"Name":"Animated Movies","Path":"/data/movies/animated/"},{"ID":78,"Name":"Anime Movies","Path":"/data/movies/anime/"},{"ID":1,"Name":"Movies","Path":"/data/movies/live action/"},{"ID":85,"Name":"Movies 4K","Path":"/data/movies/live action 4k/"},{"ID":28,"Name":"Stand-Up Comedy","Path":"/data/movies/stand-up comedy/"},{"ID":33,"Name":"Anime","Path":"/mergerfs/tv/anime/"},{"ID":33,"Name":"Anime","Path":"/data/tv/anime/"},{"ID":7,"Name":"Cartoons","Path":"/data/tv/cartoons/"},{"ID":2,"Name":"TV Shows","Path":"/data/tv/live action/"},{"ID":89,"Name":"Audiobooks","Path":"/data/books/audiobooks/"},{"ID":83,"Name":"Movies (Alt. Editions)","Path":"/data/movies/editions/"}] target=plex url=http://localhost:32400

I see that the Anime library shows up twice but with a different path each time, I assume this is the correct way Autoscan checks for a library with a matching path but if it is getting this list of libraries I'm even more confused as to why it would say that no target libraries were found.

m-rots commented 2 years ago

Autoscan fetches the Plex libraries when it's started. So I'd assume that enabling the debug verbosity automatically resolved your issue, as that restarted Autoscan ^^