If only one file is extracted the storage key contains the extracted
file instead of the folder. This leads to CPS skipping the renamer. This
check fixes that.
This is the next step in closing the loop between the downloaders and CPS. The download_id and folder from the downloader are used to find the downloaded files and start the renamer. This is done by adding an additional API call: renamer.scanfolder.
I tested this for SabNZBd only (!) and everything works as expected.
I also added transmission with thanks @manusfreedom for setting this up in f1cf0d91da. @manusfreedom, please check if this works as expected. Note that transmission now has a feature which is not in the other torrent providers: it waits until the seed ratio is met and then removes the torrent. I opened a topic in the forum to discuss how we want to deal with torrents: https://couchpota.to/forum/thread-1704.html
getDownloadStatus is only called once from renamer and all results are passed back. Def remove is added so that renamer can request a failed downlaod to be deleted from SABnzbd if enabled.
The changed functionality is as follows:
- the renamer is not on scheduled interval anymore
- the download status checker checks the status of all snatched releases every x minutes
- if a release has downloaded it fires up the renamer (if enabled)
- if it failed, it sets the release to ignored and snatches the next best release
With these additions the renamer wont scan your hd anymore when it is not required, and will retry failed downloads with new releases.
To do:
- the only downloader implemented is SabNZBd, for the others it defaults to the old behavior when releases are snatched (I think!?)
- a button to scan manually: Items added to the renamer folder are only picked up after a download completed