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

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
Akki
Posts: 16
Joined: 27 Jun 2013, 21:16

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

Post 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?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

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

Post by rednoah »

Try:

Code: Select all

def f = 'C:/Users/Username/Downloads/TV Shows' as File
f.eachMediaFolder { println it }
:idea: Please read the FAQ and How to Request Help.
Akki
Posts: 16
Joined: 27 Jun 2013, 21:16

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

Post by Akki »

That seems to have done the trick. Thanks!
Post Reply