Page 1 of 1

The current scope already contains a variable of the name X

Posted: 10 Mar 2016, 00:55
by junior0332
Hi all,

I'm having a real pain trying to test the amc script. What I ultimately want to do, is to rename files in /server/downloads and symlink them and move them to where I specify in my formatting arguments. When I run

Code: Select all

filebot -script /home/ray/scripts/amc.groovy --output "/server" --def "seriesFormat=/server/tv shows/{n}/Season {s.pad(2)}/{n} - {sxe} - {t}" "animeFormat=/Anime/{n}/{fn}" "movieFormat=/server/movies/{n} ({y})/{n} ({y})" "musicFormat=/Music/{n}/{fn}" --log-file amc.log --conflict override --def music=n --def --def skipExtract=y --def artwork=n --def clean=n --def reportError=n --def storeReport=n -non-strict "/server/downloads" --def excludeList=amc.txt --action test
I get

Code: Select all

Locking /home/ray/.filebot/logs/amc.log
MultipleCompilationErrorsException: startup failed:
Script1.groovy: 44: The current scope already contains a variable of the name input
 @ line 44, column 5.
   def input = []
       ^

Script1.groovy: 45: The current scope already contains a variable of the name failOnError
 @ line 45, column 5.
   def failOnError = _args.conflict.equalsIgnoreCase('fail')
       ^

Script1.groovy: 46: The current scope already contains a variable of the name isTest
 @ line 46, column 5.
   def isTest = _args.action.equalsIgnoreCase('test')
       ^
It goes on for 65 more times referencing pretty much everything in the script. Am I retarded? What am I doing wrong? I can't find anyone else who's having this problem.

Code: Select all

FileBot 4.6.1 (r3315)
JNA Native: 4.0.1
MediaInfo: MediaInfoLib - v0.7.69
7-Zip-JBinding: 9.20
Chromaprint: fpcalc version 1.1.0 (/usr/share/filebot/fpcalc)
Extended Attributes: OK
Groovy Engine: 2.4.5
JRE: Java(TM) SE Runtime Environment 1.8.0_74 (headless)
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 24 MB Used Memory
OS: Linux (amd64)
Package: DEB
Data: /home/ray/.filebot
uname: Linux ubuntu 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Re: The current scope already contains a variable of the nam

Posted: 10 Mar 2016, 04:13
by rednoah
Have you tried using filebot -script fn:amc yet?

Re: The current scope already contains a variable of the nam

Posted: 10 Mar 2016, 12:12
by junior0332
That worked, thank you. I copied your AMC script locally just incase the script host ever went offline. It's that a valid concern? Is there a way to run the current version of AMC locally or should I not bother?

Re: The current scope already contains a variable of the nam

Posted: 10 Mar 2016, 12:24
by rednoah
If you use fn:amc then it'll fetch the script, cache it, and try to update once a week.

You don't have to worry about GitHub being down, because filebot has a copy of the script in it's cache at all times. If you have called a script once before, then it'll be cached locally and you can call it anytime even if you're completely offline.

Re: The current scope already contains a variable of the nam

Posted: 10 Mar 2016, 13:09
by junior0332
Awesome, thank you for the explanation.