Pushover output

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
SuperDOS
Posts: 33
Joined: 20 Mar 2013, 23:34

Pushover output

Post by SuperDOS »

Hi,

I wonder how I can make pushover only send me the movie title and year for movies and for tv-show all the renamed episodes.

For example like this:

New Files Processed by FileBot:
Movie 1 (2011)
Movie 2 (2012)
Movie 3 (2013)
TV-Show 1 - 01x01 - Episode
TV-Show 2 - 02x01 - Episode

The code I use today is this, but it gives me an entry for every file:
println('Sending Pushover notification')

def msg = "Finished processing (${getRenameLog().size()} files)."
msg += "\n\nNew Files:\n"
getRenameLog().values().nameWithoutExtension.each{
if (!msg.endsWith('...')) {
if (msg.length() + it.length() < 500) {
msg += "* ${it}\n"
} else {
msg += '...'
}
}
}
println msg
println Pushover(pushover).send(msg)
}
Post Reply