Running FileBot from the console, Groovy scripting, shell scripts, etc
cams
Posts: 5 Joined: 03 Nov 2014, 14:31
Post
by cams » 04 Nov 2014, 12:49
I've located the string that formulates the rename log for the notification message, and I'd like to modify it to draw the output filename instead.
Code: Select all
if (getRenameLog().size() > 0) {
// messages used for xbmc / plex / pushover notifications
def getNotificationTitle = { "FileBot finished processing ${getRenameLog().values().findAll{ !it.isSubtitle() }.size()} files" }.memoize()
def getNotificationMessage = { prefix = '• ', postfix = '\n' -> tryQuietly{ ut_title } ?: (input.any{ !it.isSubtitle() } ? input.findAll{ !it.isSubtitle() } : input).collect{ relativeInputPath(it) as File }*.getRoot()*.getNameWithoutExtension().unique().sort{ it.toLowerCase() }.collect{ prefix + it }.join(postfix).trim() }.memoize()
I'm not sure which values to substitute here to simply have the output instead of input file name.
rednoah
The Source
Posts: 23928 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 04 Nov 2014, 13:52
Do and see
Check the code that generates the HTML report. That includes destination path information as well.
cams
Posts: 5 Joined: 03 Nov 2014, 14:31
Post
by cams » 10 Nov 2014, 05:44
Is it possible to modify the code to use the output names in the rename log? What I am hoping to change is the pushover notifications, to show the output (renamed) files rather than the input files.
rednoah
The Source
Posts: 23928 Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:
Post
by rednoah » 10 Nov 2014, 06:50
Yes, if you can understand the current code, then making modifications should be quite easy. No, if coding is not your thing.
Though why bother? Just use PushBullet instead. That'll include the full HTML report as well.
cams
Posts: 5 Joined: 03 Nov 2014, 14:31
Post
by cams » 10 Nov 2014, 10:00
Why? I prefer Pushover's front end
. And it's killing me! Coding for me is basic at best but I have figured out a few things on my own so far... I feel like I am close, I just need a few small hints to show me the right direction!
iampaulh
Power User
Posts: 22 Joined: 24 Jan 2013, 12:12
Post
by iampaulh » 26 Feb 2015, 12:38
Did you ever figure this out @cams?
Would like to get the output filename in Pushover as well