This commit is contained in:
LooseSeal2
2019-07-19 11:17:39 -07:00
parent b116bdc9b6
commit c66f552ec2
16 changed files with 281 additions and 429 deletions

View File

@@ -11,7 +11,8 @@ torrentid=$1
torrentname=$2
torrentpath=$3
log() {
log()
{
logger -t deluge-extractarchives "$@"
}
@@ -23,11 +24,11 @@ for format in "${formats[@]}"; do
cd "$(dirname "$file")"
file=$(basename "$file")
# if extraction_subdir is not empty, extract to subdirectory
if [[ ! -z "$extraction_subdir" ]]; then
if [[ ! -z "$extraction_subdir" ]] ; then
mkdir "$extraction_subdir"
cd "$extraction_subdir"
file="../$file"
fi
${commands[$format]} "$file"
done < <(find "$torrentpath/$torrentname" -iname "*.${format}")
done
done < <(find "$torrentpath/$torrentname" -iname "*.${format}" )
done