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

Prevent crashing when failing to connect to Plex #133

Open tomerpeleg-pub opened 2 years ago

tomerpeleg-pub commented 2 years ago

Right now if autoscan fails to connect to plex it shuts down with the error "Failed initialising target". When using autoscan and plex with docker, it can sometimes take plex a couple minutes to start up, whereas autoscan is much faster. As a result even if starting plex first, autoscan often fails to start and therefore has to be manually restarted later. This makes starting or updating the docker automatically difficult.

Might it be possible to add either a configurable delay to the startup script, or possibly even a method for retrying the connection every few minutes if it initially fails?

Thanks!

musicderp commented 2 years ago

Also interested in this, but with a slightly different approach, I'd like to be able to mark a server as allowed to fail, meaning that if autoscan doesn't see it, it just skips it but continues to push updates to all the online servers