1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 16:28:51 -05:00

* don't crash if ut_title is not set but figure out some other useful email title

This commit is contained in:
Reinhard Pointner 2012-10-29 09:56:17 +00:00
parent 99a2013153
commit 5bf2dc1a0f

View File

@ -188,13 +188,14 @@ if (gmail && !getRenameLog().isEmpty()) {
// send html mail
def renameLog = getRenameLog()
def emailTitle = tryQuietly { ut_title } ?: input*.dir.unique()
sendGmail(
subject: '[FileBot] ' + ut_title,
subject: "[FileBot] ${emailTitle}",
message: XML {
html {
body {
p("FileBot finished processing ${ut_title} (${renameLog.size()} files).");
p("FileBot finished processing ${emailTitle} (${renameLog.size()} files).");
hr(); table {
th("Parameter"); th("Value")
_args.bindings.findAll{ param -> param.key =~ /^ut_/ }.each{ param ->