Skip to content

Commit

Permalink
Support --format option (requires FileBot r9612 or higher)
Browse files Browse the repository at this point in the history
  • Loading branch information
rednoah committed Feb 5, 2023
1 parent 0025699 commit 15ef18b
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions miss.groovy
Expand Up @@ -46,17 +46,27 @@ def episodeList = shows.collectMany{ s ->
}

// ignore special episodes
return episodeList.findAll{ e -> e.regular }
return episodeList.findAll{ e -> e.episode }
} as LinkedHashSet


// print missing episodes
def missingEpisodes = episodeList - episodes

// support custom output formatting
def format = _args.expressionFormat

// print missing episodes directly to standard console output (and not to the --log-file)
missingEpisodes.each{ e ->
println e
if (format) {
try {
println format.apply(e)
} catch(error) {
log.warning "$error.message [$e]"
}
} else {
println e
}
}


Expand Down

0 comments on commit 15ef18b

Please sign in to comment.