amc EOF error

Support for Ubuntu and other Desktop Linux distributions
Post Reply
omnigamer
Donor
Posts: 2
Joined: 30 Apr 2016, 18:25

amc EOF error

Post by omnigamer »

Hi there,

I have an issue when using the amc script called from the context of transmission post downloading script. Here's how my script is set up:

Code: Select all

$ cat transmission-postprocess.sh 
#!/bin/sh

# Input Parameters
ARG_PATH="$TR_TORRENT_DIR/$TR_TORRENT_NAME"
ARG_NAME="$TR_TORRENT_NAME"
ARG_LABEL="N/A"

# Configuration
CONFIG_OUTPUT="/mnt/array/data"

if [[ "$TR_TORRENT_DIR" == "$CONFIG_OUTPUT/Downloads/Movies" ]]; then
    ARG_LABEL="Movie"
elif [[ "$TR_TORRENT_DIR" == "$CONFIG_OUTPUT/Downloads/Music" ]]; then
    ARG_LABEL="Music"
fi

if [[ "$ARG_LABEL" != "N/A" ]]; then
    /usr/bin/filebot -script fn:amc --output "$CONFIG_OUTPUT" --action duplicate --conflict skip -non-strict --log-file /tmp/amc.log --def unsorted=y music=y artwork=y subtitles="en" plex="localhost" ut_dir="$ARG_PATH" ut_kind="multi" ut_title="$ARG_NAME" ut_label="$ARG_LABEL" "seriesFormat=TV/{n}/Season {s.pad(2)}/{n} - {s}x{e.pad(2)} - {t}{'.'+lang}" "movieFormat=Movies/{n} ({y})/{n} ({y}){'.'+lang}" "musicFormat=Music/{n}/{album+'/'}{pi.pad(2)+. '} - {t}"
fi
Here's what I get when I try to run the script (for testing purposes I ran it manually)

Code: Select all

$ TR_TORRENT_DIR="/mnt/array/data/Downloads/Music" TR_TORRENT_NAME="The Ocarina of Rhyme [FLAC]" ./transmission-postprocess.sh 
Locking /tmp/amc.log
Run script [fn:amc] at [Sat Apr 30 13:30:54 CDT 2016]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: subtitles = en
Parameter: plex = localhost
Parameter: ut_dir = /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]
Parameter: ut_kind = multi
Parameter: ut_title = The Ocarina of Rhyme [FLAC]
Parameter: ut_label = Music
Parameter: seriesFormat = TV/{n}/Season {s.pad(2)}/{n} - {s}x{e.pad(2)} - {t}{'.'+lang}
Parameter: movieFormat = Movies/{n} ({y})/{n} ({y}){'.'+lang}
Parameter: musicFormat = Music/{n}/{album+'/'}{pi.pad(2)+. '} - {t}
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/01 Clipse - Virginia (Lost Woods).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/02 Dr. Dre & Snoop Dogg - Still D.R.E. (Getting Treasure).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/03 Jay-Z - No Hook (Meeting the Owl).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/04 Pimp C, Lil Keke, P.O.P. - Knockin' Doorz Down (Hyrule Field).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/05 Common - I Used To Love H.E.R. (Hyrule Market).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/06 Aesop Rock - No Jumpercables (Goron Village).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/07 Edan - Fumbling Over Words and Rhyme (Battle).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/08 MF Doom - Vomit (Horse Race).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/09 Spank Rock - IMC (Zora's Domain).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/10 Slim Thug & Mike Jones - Still Tippin' (Great Fairy's Fountain).flac
Input: /mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/11 Busta Rhymes - Don't Touch Me (Gerudo Valley).flac
Group: [music:the ocarina of rhyme flac] => [01 Clipse - Virginia (Lost Woods).flac, 02 Dr. Dre & Snoop Dogg - Still D.R.E. (Getting Treasure).flac, 03 Jay-Z - No Hook (Meeting the Owl).flac, 04 Pimp C, Lil Keke, P.O.P. - Knockin' Doorz Down (Hyrule Field).flac, 05 Common - I Used To Love H.E.R. (Hyrule Market).flac, 06 Aesop Rock - No Jumpercables (Goron Village).flac, 07 Edan - Fumbling Over Words and Rhyme (Battle).flac, 08 MF Doom - Vomit (Horse Race).flac, 09 Spank Rock - IMC (Zora's Domain).flac, 10 Slim Thug & Mike Jones - Still Tippin' (Great Fairy's Fountain).flac, 11 Busta Rhymes - Don't Touch Me (Gerudo Valley).flac]
ScriptException: SyntaxError: expecting EOF, found '+'
Processing 11 unsorted files
[DUPLICATE] Rename [/mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/01 Clipse - Virginia (Lost Woods).flac] to [/mnt/array/data/Unsorted/The Ocarina of Rhyme [FLAC]/01 Clipse - Virginia (Lost Woods).flac]
[DUPLICATE] Failed to rename [/mnt/array/data/Downloads/Music/The Ocarina of Rhyme [FLAC]/01 Clipse - Virginia (Lost Woods).flac]
AccessDeniedException: /mnt/array/data/Unsorted
Finished without processing any files
Failure (°_°)
I'm assuming the line about SyntaxError: expecting EOF is the issue here, but I'm not sure.

Code: Select all

$ filebot -script fn:sysinfo
FileBot 4.6.1 (r3315)
JNA Native: 4.0.1
MediaInfo: MediaInfoLib - v0.7.84
Apache Commons VFS: [zip, ftps, rar, ftp, tar, tgz, tbz2, sftp]
Chromaprint: fpcalc version 1.3.1 (fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.5
JRE: OpenJDK Runtime Environment 1.8.0_92 (headless)
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 25 MB Used Memory
OS: Linux (amd64)
Package: AUR
Data: /home/scah/.filebot
uname: Linux scah 4.5.1-1-ARCH #1 SMP PREEMPT Thu Apr 14 19:19:32 CEST 2016 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: amc EOF error

Post by rednoah »

Bad format. This part is broken:

Code: Select all

{pi.pad(2)+. '}
:idea: Please read the FAQ and How to Request Help.
Post Reply