<SOLVED>At a loss....

Any questions? Need some help?
Post Reply
User avatar
ashfallen0
Power User
Posts: 32
Joined: 14 Jan 2012, 10:44

<SOLVED>At a loss....

Post by ashfallen0 »

I'm having issues with my movies only here. I can't tell if filebot is having issues with a set of files or if it's with spaces in the ut_title parameter.

Code: Select all

Parameter: movieFormat = movies/{n.replaceAll(":", replacement = " -")} - {y}/{n.replaceAll(":", replacement = " -")} - {y} {[hpi]}{[+resolution} {' '+vc}{"-"+ac+"]"}
Parameter: music = n
Parameter: clean = y
Parameter: xbmc = 192.168.0.104
Parameter: artwork = y
Parameter: ut_dir = /home/ash/torrent/The Smurfs 2 (2013) [3D] [HSBS]
Parameter: ut_label = movie
Parameter: ut_kind = multi
Parameter: ut_title = The Smurfs 2 (2013) [3D] [HSBS]
Input: /home/ash/torrent/The Smurfs 2 (2013) [3D] [HSBS]/The.Smurfs.2.2013.1080p.3D.HSBS.BluRay.x264.YIFY.mp4
Group: [mov:The Smurfs 2 (2013)] => [The.Smurfs.2.2013.1080p.3D.HSBS.BluRay.x264.YIFY.mp4]
Done ヾ(@⌒ー⌒@)ノ
what I get back at the command line is :

ScriptException: SyntaxError: unexpected token: <--there is one whitespace here if relevant.

any ideas? I cannot workaround this via commandline. Also, this does NOT affect anime or tv that I download, since they aren't in sub-directories in the torrent. :?:
Last edited by ashfallen0 on 20 Nov 2013, 15:23, edited 1 time in total.
Image PHPBB3 hates me.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: At a loss....

Post by rednoah »

Your format doesn't compile. Use the Format Editor to code up your format.
:idea: Please read the FAQ and How to Request Help.
User avatar
ashfallen0
Power User
Posts: 32
Joined: 14 Jan 2012, 10:44

Re: At a loss....

Post by ashfallen0 »

This is the same format I've used for a while now. Filebot GUI works fine with it. This expression is actually a much slimmer version of the one I use for both TV and Anime. The only difference is that the movie files come with their own sub-directories.

my full expression:

Code: Select all

/home/ash/movies/{norm = (n.replaceAll(":", replacement = " -"))} - {y}/{norm = (n.replaceAll(":", replacement = " -"))} - {y} {[hpi]}{'['+resolution} {' '+vc}{'-'+ac+']'}
my whole script:

Code: Select all

#!/bin/bash
TORRENT_ID=$1
TORRENT_NAME=$2
TORRENT_PATH=$3
TORRENT_LABEL=$(/home/ash/.config/deluge/getlabel.py $TORRENT_ID)
NOW=$(date +"%m_%d_%Y")
CHECK=$(hostname)
LOG="/home/ash/.log/$CHECK.deluged_execute_complete.$NOW.log"
LOG2="/home/ash/.log/$CHECK.deluged_execute_filebot.$NOW.log"

echo "Torrent Details"+$TORRENT_NAME+$TORRENT_PATH+$TORRENT_ID+$TORRENT_LABEL >> $LOG

filebot -script fn:amc --output "/home/ash/" --action move --conflict override -non-strict --def "seriesFormat=tv/{n.replaceAll(\":\", replacement = \" -\")}/{n.replaceAll(\":\", replacement = \" -\")} - {episode.special ? \"S00E\"+special.pad(2) : s00e00} - {t.replaceAll(\":\", replacement = \" -\")} {[hpi]}{di}{\"[\"+resolution} {' '+vc}{\"-\"+ac+\"]\"}" "animeFormat=anime/{(primaryTitle ?: n).replace(\":\",\" -\").replaceAll(/[?]/, "")}/{(primaryTitle ?: n).replace(\":\",\" -\").replaceAll(/[?]/, "")} - {episode.special ? "S"+special.pad(2) : absolute.pad(3)} - {t.replace(\":\",\" -\").replaceAll(/[?]/, "")} {[hpi]}{"["+resolution} {' '+vc}{\"-\"+ac+\"]\"}" "movieFormat=movies/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y}/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y} {[hpi]}{"["+resolution} {' '+vc}{\"-\"+ac+\"]\"}" --def music=n --def clean=y --def xbmc=192.168.0.104 --def artwork=y "ut_dir=$TORRENT_PATH/$TORRENT_NAME" "ut_label=$TORRENT_LABEL" "ut_kind=multi" "ut_title=$TORRENT_NAME" >> $LOG2

##CURRENT SCHEMAS
#----------------
#TV:
#----
#/home/ash/tv/{n.replaceAll(":", replacement = " -")}/{n.replaceAll(":", replacement = " -")} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t.replaceAll(":", replacement = " -")} {[hpi]}{di}{"["+resolution} {" "+vc}{"-"+ac+"]"}
#ANIME:
#------
#/home/ash/anime/{(primaryTitle ?: n).replace(":"," -").replaceAll(/[?]/, "")}/{(primaryTitle ?: n).replace(":"," -").replaceAll(/[?]/, "")} - {episode.special ? "S"+special.pad(2) : absolute.pad(3)} - {t.replace(":"," -").replaceAll(/[?]/, "")} {[hpi]}{"["+resolution} {" "+vc}{"-"+ac+"]"}
#MOVIES:
#-------
#/home/ash/movies/{norm = (n.replaceAll(":", replacement = " -"))} - {y}/{norm = (n.replaceAll(":", replacement = " -"))} - {y} {[hpi]}{"["+resolution} {" "+vc}{"-"+ac+"]"}
Image PHPBB3 hates me.
User avatar
rednoah
The Source
Posts: 22974
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: At a loss....

Post by rednoah »

You're probably escaping it wrong, and thus passing it an invalid format expression.

I'm not your cmdline checker though. :P Use my Escape Tool or trial-error to figure out the issue.
:idea: Please read the FAQ and How to Request Help.
User avatar
ashfallen0
Power User
Posts: 32
Joined: 14 Jan 2012, 10:44

Re: At a loss....

Post by ashfallen0 »

Actually had to split the difference between me and you. That check tool rocks, but it tried to escape single quotes too! It gave me:

Code: Select all

"movies/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y}/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y} {[hpi]}{\'[\'+resolution} {\' \'+vc}{\'-\'+ac+\']\'}"
ScriptException: SyntaxError: unexpected char: '\'

once I un-escaped the single-quotes, I got the following and it runs cleanly now.

Code: Select all

movies/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y}/{norm = (n.replaceAll(\":\", replacement = \" -\"))} - {y} {[hpi]}{'['+resolution} {' '+vc}{'-'+ac+']'}
the only difference, and I was unable to see it clearly in all that was:
{\"-\"+ac+\"]\"} <---what I had....
{'-'+ac+']'} <--what I have now.


SRSLY that tool needs to be a feature of the GUI!
Image PHPBB3 hates me.
Post Reply