1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-22 16:02:43 +00:00

Updated Common Problems (markdown)

Joel Kåberg 2017-04-07 22:13:07 +02:00
parent 8a1f7698fd
commit b62c4c3cfa

@ -53,4 +53,68 @@ Some sites cannot be logged into automatically and require you to login manually
![Chrome cookies](http://i.imgur.com/cpm31SO.png)
* Firefox
![Firefox cookies](http://i.imgur.com/lI4pNfP.png)
![Firefox cookies](http://i.imgur.com/lI4pNfP.png)
## Unpack Torrents
Most torrent clients doesn't come with the automatic handling of compressed archives like their usenet counterparts. To solve this one could use a set of scripts. For this example I'll use Deluge, however aslong as the torrent client can execute an script you should be fine.
**NOTE**: This guide applies only to Linux systems.
Beforehand you should make sure that packages **unrar** and **unzip** is installed on your system.
To setup Deluge you'd need the execute plugin which you can enable under Settings->Plugins (look for Execute). Once enabled you'll find Execute to the left in the Categories pane. In execute add an event like so:
![Deluge Execute plugin](http://i.imgur.com/E9YOhLv.png)
The /config/extract script looks like this:
```
#!/bin/bash
formats=(zip rar)
commands=([zip]="unzip -u" [rar]="unrar -r -o- e")
extraction_subdir='deluge_extracted'
torrentid=$1
torrentname=$2
torrentpath=$3
log()
{
logger -t deluge-extractarchives "$@"
}
log "Torrent complete: $@"
cd "${torrentpath}"
for format in "${formats[@]}"; do
while read file; do
log "Extracting \"$file\""
cd "$(dirname "$file")"
file=$(basename "$file")
# if extraction_subdir is not empty, extract to subdirectory
if [[ ! -z "$extraction_subdir" ]] ; then
mkdir "$extraction_subdir"
cd "$extraction_subdir"
file="../$file"
fi
${commands[$format]} "$file"
done < <(find "$torrentpath/$torrentname" -iname "*.${format}" )
done
```
And 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).
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
The content of our cleanup script is
```
#!/bin/bash
if [ -d "$radarr_moviefile_sourcefolder" ] && [ "$(basename $radarr_moviefile_sourcefolder)" = "deluge_extracted" ] ; then
rm -rf $radarr_moviefile_sourcefolder
fi
```
Make sure you set execution rights on the script (chmod +x /config/cleanup).
In Radarr head over to Settings->Connect and add a new Connection->Custom Script. Add it like so:
![Custom script in Radarr](http://i.imgur.com/b7a0Est.png)
Voila! You're now all set to automatically handle compressed releases.