* rename new option to --def deleteAfterExtract=y

This commit is contained in:
Reinhard Pointner 2013-11-23 15:33:26 +00:00
parent 9264278a58
commit c2adae2990
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ def xbmc = tryQuietly{ xbmc.split(/[ ,|]+/) }
def plex = tryQuietly{ plex.split(/[ ,|]+/) }
// extra options, myepisodes updates and email notifications
def deleteArchives = tryQuietly{ archives.equals('delete') }
def deleteAfterExtract = tryQuietly{ deleteAfterExtract.toBoolean() }
def excludeList = tryQuietly{ new File(_args.output, excludeList) }
def myepisodes = tryQuietly{ myepisodes.split(':', 2) }
def gmail = tryQuietly{ gmail.split(':', 2) }
@ -100,7 +100,7 @@ input = input.flatten{ f ->
tempFiles += extractDir
tempFiles += extractFiles
if (deleteArchives) {
if (deleteAfterExtract) {
_log.finest("Mark archive for deletion: $f")
f.deleteOnExit()
f.dir.listFiles().toList().findAll{ v -> v.name.startsWith(f.nameWithoutExtension) && v.extension ==~ /r\d+/ }.each{ v ->