mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-15 13:55:03 -05:00
* ignore sample/trailer files also automatically in simple -rename calls as well
This commit is contained in:
parent
6ede531e7f
commit
b40647ddf2
@ -138,7 +138,10 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||
public List<File> renameSeries(Collection<File> files, RenameAction renameAction, ConflictAction conflictAction, File outputDir, ExpressionFormat format, EpisodeListProvider db, String query, SortOrder sortOrder, ExpressionFilter filter, Locale locale, boolean strict) throws Exception {
|
||||
CLILogger.config(format("Rename episodes using [%s]", db.getName()));
|
||||
|
||||
List<File> mediaFiles = filter(files, VIDEO_FILES, SUBTITLE_FILES);
|
||||
// ignore sample files
|
||||
List<File> fileset = filter(files, not(getClutterFileFilter()));
|
||||
|
||||
List<File> mediaFiles = filter(fileset, VIDEO_FILES, SUBTITLE_FILES);
|
||||
if (mediaFiles.isEmpty()) {
|
||||
throw new Exception("No media files: " + files);
|
||||
}
|
||||
@ -201,7 +204,7 @@ public class CmdlineOperations implements CmdlineInterface {
|
||||
|
||||
// handle derived files
|
||||
List<Match<File, ?>> derivateMatches = new ArrayList<Match<File, ?>>();
|
||||
SortedSet<File> derivateFiles = new TreeSet<File>(files);
|
||||
SortedSet<File> derivateFiles = new TreeSet<File>(fileset);
|
||||
derivateFiles.removeAll(mediaFiles);
|
||||
|
||||
for (File file : derivateFiles) {
|
||||
|
Loading…
Reference in New Issue
Block a user