Page 1 of 1

[CODE] Editing amc script to modify pushover notification

Posted: 04 Nov 2014, 12:49
by cams
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.

Re: [CODE] Editing amc script to modify pushover notificatio

Posted: 04 Nov 2014, 13:52
by rednoah
Do and see ;)

Code: Select all

println getRenameLog()
Check the code that generates the HTML report. That includes destination path information as well.

Re: [CODE] Editing amc script to modify pushover notificatio

Posted: 10 Nov 2014, 05:44
by cams
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.

Re: [CODE] Editing amc script to modify pushover notificatio

Posted: 10 Nov 2014, 06:50
by rednoah
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.

Re: [CODE] Editing amc script to modify pushover notificatio

Posted: 10 Nov 2014, 10:00
by cams
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!

Re: [CODE] Editing amc script to modify pushover notificatio

Posted: 26 Feb 2015, 12:38
by iampaulh
Did you ever figure this out @cams?

Would like to get the output filename in Pushover as well :)