AMC linux script error deluge
Posted: 28 Mar 2015, 21:20
Hi everyone.
I am trying to migrate from Utorrent on windows to deluge on ubuntu server as i love the client/server setup.
so i have managed to set up deluge and filebot on my odroid (kinda like raspberry pi but faster).
but when i try to migrate (and edit) the command it gives me an error i cant figure out...
first:
As deluge dont pass the lable i set my rss feeds to use different download folders: /media/usbdrive/download/movies and /media/usbdrive/download/tv
from this i can then tell what type it is and set the corrent "ut_label" parameter.
now here's the script:
the seriesFormat is from utorrent filebot command so it should be using escape chars correctly as it works on my utorrent setup.
here's the amc.log:
can anyone explain why this is failing and what that " expecting EOF, found '(' " refers to?
Thanks
Dalideli
I am trying to migrate from Utorrent on windows to deluge on ubuntu server as i love the client/server setup.
so i have managed to set up deluge and filebot on my odroid (kinda like raspberry pi but faster).
but when i try to migrate (and edit) the command it gives me an error i cant figure out...
first:
As deluge dont pass the lable i set my rss feeds to use different download folders: /media/usbdrive/download/movies and /media/usbdrive/download/tv
from this i can then tell what type it is and set the corrent "ut_label" parameter.
now here's the script:
Code: Select all
#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3
type=`echo $TORRENT_PATH | cut -d'/' -f5`
echo "ID:" $TORRENT_ID >> /root/delugelog
echo "Name:" $TORRENT_NAME >> /root/delugelog
echo "Path:" $TORRENT_PATH >> /root/delugelog
#echo "Type" $type >> /root/delugelog
if [ $type == "Serier" ]; then
echo "the type is.. " $type >> /root/delugelog
fi
echo " - - - - " >> /root/delugelog
filebot -script fn:amc --output "/media/usbdrive" --log-file amc.log --action move --conflict override -non-strict --def excludeList=amc.txt --def artwork=y --def storeReport=y --def minLengthMS=0 --def "seriesFormat=/media/usbdrive/tv/{n}{'/Season ' + s}/{n.upperInitial().space('.').replaceAll(/[,()]+/).replaceAll(/\\.-\\./,'.')}.{s00e00}.{t.upperInitial().space('.').replaceAll(/[,]+/)replaceAll(/\\.-\\./,'.').replacePart('Part.\$1')}{'.'+fn.match(/(?i:unrated)/).toLowerCase().upperInitial()}{'.'+fn.match(/(?i:uncut)/).toLowerCase().upperInitial()}{'.'+fn.match(/(?i:extended)/).toLowerCase ().upperInitial()}{'.'+fn.match(/(?i:internal)/).toUpperCase()}{(dim[1]>480 && dim[0]==1280) ? '.720p' : (dim[1]>720 && dim[0]==1920) ? '.1080p' : null}{\".$source\"}{\".\"+vc.replaceAll(/AVC/, \"H264\")}{'-'+fn.replaceAll(/$n/,n.replaceAll(/ [-]/,'.')).match(/(?:(?<=[-])(?!(cd|CD)[0-9]+)\\w+$)|(?:\^(?!(cd|CD)[0-9]+)[A-Za-z0-9]+(?=[-]))|(?:(?<=\^[\\[])[\^\\]]+(?=[\\]]))|(?:(?<=[\\[])[\^\\]]+(?=[\\]]$))/)}" --def clean=y "ut_label=TV" "ut_title=$TORRENT_NAME" "ut_kind=multi" "ut_dir=$TORRENT_PATH/$TORRENT_NAME"
here's the amc.log:
Code: Select all
Parameter: excludeList = amc.txt
Parameter: artwork = y
Parameter: storeReport = y
Parameter: minLengthMS = 0
Parameter: seriesFormat = /media/usbdrive/tv/{n}{'/Season ' + s}/{n.upperInitial().space('.').replaceAll(/[,()]+/).replaceAll(/\.-\./,'.')}.{s00e00}.{t.upperInitial().space('.').replaceAll(/[,]+/)replaceAll(/\.-\./,'.').replacePart('Part.$1')}{'.'+fn.match(/(?i:unrated)/).toLowerCase().upperInitial()}{'.'+fn.match(/(?i:uncut))/).toLowerCase().upperInitial()}{'.'+fn.match(/(?i:extended)/).toLowerCase ().upperInitial()}{'.'+fn.match(/(?i:internal)/).toUpperCase()}{(dim[1]>480 && dim[0]==1280) ? '.720p' : (dim[1]>720 && dim[0]==1920) ? '.1080p' : null}{"."}{"."+vc.replaceAll(/AVC/, "H264")}{'-'+fn.replaceAll(//,n.replaceAll(/ [-]/,'.')).match(/(?:(?<=[-])(?!(cd|CD)[0-9]+)\w+$)|(?:\^(?!(cd|CD)[0-9]+)[A-Za-z0-9]+(?=[-]))|(?:(?<=\^[\[])[\^\]]+(?=[\]]))|(?:(?<=[\[])[\^\]]+(?=[\]]$))/)}
Parameter: clean = y
Parameter: ut_label = TV
Parameter: ut_title = Grimm.S04E15.HDTV.x264-LOL[ettv]
Parameter: ut_kind = multi
Parameter: ut_dir = /media/usbdrive/Download/Serier/Grimm.S04E15.HDTV.x264-LOL[ettv]
Using excludes: /media/usbdrive/amc.txt (0)
Input: /media/usbdrive/Download/Serier/Grimm.S04E15.HDTV.x264-LOL[ettv]/grimm.415.hdtv-lol.mp4
Exclude: /media/usbdrive/Download/Serier/Grimm.S04E15.HDTV.x264-LOL[ettv]/Torrent-Downloaded-From-extratorrent.cc.txt
Exclude: /media/usbdrive/Download/Serier/Grimm.S04E15.HDTV.x264-LOL[ettv]/grimm.415.hdtv-lol.nfo
Group: [tvs:grimm] => [grimm.415.hdtv-lol.mp4]
ScriptException: SyntaxError: expecting EOF, found '('
Clean clutter files and empty folders
Finished without processing any files
Failure (°_°)
can anyone explain why this is failing and what that " expecting EOF, found '(' " refers to?
Thanks
Dalideli