mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-23 08:18:52 -05:00
* utorrent-postprocess work standalone easily by adding args
This commit is contained in:
parent
bcfb4d3380
commit
f28a361d98
@ -41,11 +41,11 @@ def groups = input.groupBy{ f ->
|
||||
groups.each{ group, files ->
|
||||
// EPISODE MODE
|
||||
if (group.tvs && !group.mov) {
|
||||
return rename(file:files, format:'TV Shows/{n} - {s00e00} - {t}', db:'TheTVDB')
|
||||
rename(file:files, format:'TV Shows/{n}/{episode.special ? "Special" : "Season "+s}/{n} - {episode.special ? "S00E"+special.pad(2) : s00e00} - {t}', db:'TheTVDB')
|
||||
}
|
||||
|
||||
// MOVIE MODE
|
||||
if (group.mov && !group.tvs) {
|
||||
return rename(file:files, format:'Movies/{n} ({y}){" CD$pi"}', db:'TheMovieDB')
|
||||
rename(file:files, format:'Movies/{n} ({y})/{n} ({y}){" CD$pi"}', db:'TheMovieDB')
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,16 @@ def failOnError = _args.conflict == 'fail'
|
||||
// print input parameters
|
||||
_args.parameters.each{ k, v -> println "Parameter: $k = $v" }
|
||||
|
||||
if (ut_kind == "multi") {
|
||||
input += new File(ut_dir).getFiles() // multi-file torrent
|
||||
if (args.empty) {
|
||||
// assume we're called with utorrent parameters
|
||||
if (ut_kind == "multi") {
|
||||
input += new File(ut_dir).getFiles() // multi-file torrent
|
||||
} else {
|
||||
input += new File(ut_dir, ut_file) // single-file torrent
|
||||
}
|
||||
} else {
|
||||
input += new File(ut_dir, ut_file) // single-file torrent
|
||||
// assume we're called normally with arguments
|
||||
input += args.getFiles()
|
||||
}
|
||||
|
||||
// extract archives if necessary
|
||||
|
Loading…
Reference in New Issue
Block a user