First thing, thanks for this amazing software and all support that come with it!
I now come to ask for some help, just a minor thing not really an issue.
I wrote a simplified script based on your renall script, to renall files (even if I call it after every downloads completed) and after send a pushbullet notification via a personnal python script (i.e. send_pushbullet.py at the end).
The small issue I'm having is : 1) how can I convert my SxE from parseEpisodeNumber() to an absolute format and store it in a string?
And also :2) how can I get the episode's name into a string?
Less important but an answer would be nice too, I had real difficulties finding which method are availables for groovy scripts, is there any link to a complete doc?
Thanks in advance!
Here's my call :
Code: Select all
java -jar filebot.jar -script D:/Downloads/Torrents/automation/filebot_scripts/rename_move.groovy D:/Downloads/Torrents/Series/ --format "D:/Video/Series/{n}{'/Season '+s}/{n.space('.')}.{'S'+s.pad(2)}.{'E'+e.pad(2)}.{t.space('.')}.{vf}.{vc}.{ac}{'-'n.findMatch(group) ? null : group}" -non-strict --db TheTVDB
Code: Select all
def target = tryQuietly{ target } ?: 'file'
def byfile = tryQuietly{ byfile.toBoolean() }
def name = ''' '''
args.eachMediaFolder {
name = detectSeriesName(it)+' ' + parseEpisodeNumber(it) + ' - ' + (getMediaInfo(file:it, format:'({vf})'))
if (it.isDisk()) {
return rename(file:it) // rename disk folders instead of files regardless of mode
}
switch(target) {
case 'file' : return byfile ? it.listFiles().findAll{ it.isVideo() || it.isSubtitle() }.findResults{ rename(file:it) } : rename(folder:it) // rename files within each folder
case 'folder' : return rename(file:it) // rename folders as if they were files
}
}
"C:/Python26/python.exe D:/Downloads/Torrents/automation/send_pushbullet.py Filebot \"${name}\"".execute()