1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-16 16:04:08 +01:00

Updated Common Problems (markdown)

hotio 2017-07-17 17:57:25 +02:00
parent c15618f77b
commit 6046415973

@ -122,6 +122,27 @@ done
```
The script can be found at the [Deluge wiki pages](http://dev.deluge-torrent.org/wiki/Plugins/Execute#Extractarchivesscript). Make sure you set execution rights on the script (chmod +x /config/extract).
Alternative script that only does unrar:
```sh
#!/bin/bash
torrent_id="$1"
torrent_name="$2"
torrent_path="$3"
torrent_path_full="$torrent_path/$torrent_name"
LOG="/config/finished-torrents.log"
echo "$(date '+%d/%m/%Y %H:%M:%S') - $torrent_id - $torrent_path - $torrent_name" >> $LOG
if [[ $(find "$torrent_path_full" -type f -iname "*.rar" -print) ]]; then
mkdir "$torrent_path/_UNPACK_$torrent_name"
find "$torrent_path_full" -type f -iname "*.rar" -exec unrar x {} "$torrent_path/_UNPACK_$torrent_name" \;
find "$torrent_path/_UNPACK_$torrent_name" -type f -exec touch {} \;
mv "$torrent_path/_UNPACK_$torrent_name" "$torrent_path_full/EXTRACTED"
fi
```
Now Radarr will via it's automatic download handling find and move/copy or link the movie to it's destination for you. However this leaves us with unnecessary files laying around in our download folder. To mitigate this we'll make Radarr execute an cleanup script once it's done importing the movie. The cleanup script only deletes the folder deluge_extracted which is created by our extract script.
First of create our script somewhere Radarr can find it. In my example: /config/cleanup