Page 1 of 1

No signature of method java.lang.String.getMediaFolders()

Posted: 27 Jun 2013, 21:22
by Akki
Hi. Recently, I started getting this error trying to use the script that sorts my downloaded movies and TV shows.

Code: Select all

MissingMethodException: No signature of method: java.lang.String.getMediaFolders
() is applicable for argument types: () values: []
groovy.lang.MissingMethodException: No signature of method: java.lang.String.get
MediaFolders() is applicable for argument types: () values: []
        at Script2$_run_closure21_closure94.doCall(Script2.groovy:34)
        at Script2$_run_closure21.doCall(Script2.groovy:34)
        at Script3.run(Script3.groovy:3)
        at net.sourceforge.filebot.cli.ScriptShell.evaluate(Unknown Source)
        at net.sourceforge.filebot.cli.ScriptShell.runScript(Unknown Source)
        at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)

        at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (‘_‘)
Launch4j: Failed to run the given command.
Here's the script:

Code: Select all

include("lib/htpc")
['C:/Users/Username/Downloads/TV Shows'].eachMediaFolder{rename(folder:it, format:'C:/Users/Username/TV/{n}/Season {s}/{n} - {sxe} - {t}', db:'thetvdb', strict:false)}
['C:/Users/Username/Downloads/Movies'].eachMediaFolder{rename(folder:it, format:'C:/Users/Melony/Username/{n} ({y})/{n} ({y}){" [part $pi of $pn]"}', db:'imdb', strict:false)}
refreshPlexLibrary('localhost')
Not sure exactly how long it hasn't been working, but it may have been around the time of the latest update. Is there some kind of namespace issue going on, maybe?

Re: No signature of method java.lang.String.getMediaFolders(

Posted: 28 Jun 2013, 01:48
by rednoah
Try:

Code: Select all

def f = 'C:/Users/Username/Downloads/TV Shows' as File
f.eachMediaFolder { println it }

Re: No signature of method java.lang.String.getMediaFolders(

Posted: 01 Jul 2013, 18:38
by Akki
That seems to have done the trick. Thanks!