[CODE] Editing amc script to modify pushover notification

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
cams
Posts: 5
Joined: 03 Nov 2014, 14:31

[CODE] Editing amc script to modify pushover notification

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

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
cams
Posts: 5
Joined: 03 Nov 2014, 14:31

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

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

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

Post 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.
:idea: Please read the FAQ and How to Request Help.
cams
Posts: 5
Joined: 03 Nov 2014, 14:31

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

Post 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!
iampaulh
Power User
Posts: 22
Joined: 24 Jan 2013, 12:12

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

Post by iampaulh »

Did you ever figure this out @cams?

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