* improved support for derived files in cmdline -rename mode
@see http://www.filebot.net/forums/viewtopic.php?f=8&t=668#p4448
This commit is contained in:
parent
0e8bd858c3
commit
492e20ae8a
|
@ -201,6 +201,23 @@ public class CmdlineOperations implements CmdlineInterface {
|
|||
throw new Exception("Unable to match files to episode data");
|
||||
}
|
||||
|
||||
// handle derived files
|
||||
List<Match<File, ?>> derivateMatches = new ArrayList<Match<File, ?>>();
|
||||
SortedSet<File> derivateFiles = new TreeSet<File>(files);
|
||||
derivateFiles.removeAll(mediaFiles);
|
||||
|
||||
for (File file : derivateFiles) {
|
||||
for (Match<File, ?> match : matches) {
|
||||
if (file.getParentFile().equals(match.getValue().getParentFile()) && isDerived(file, match.getValue()) && match.getCandidate() instanceof Episode) {
|
||||
derivateMatches.add(new Match<File, Object>(file, ((Episode) match.getCandidate()).clone()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// add matches from other files that are linked via filenames
|
||||
matches.addAll(derivateMatches);
|
||||
|
||||
// first write all the metadata if xattr is enabled
|
||||
if (useExtendedFileAttributes()) {
|
||||
try {
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<extension>ts</extension>
|
||||
<extension>tp</extension>
|
||||
<extension>m2ts</extension>
|
||||
<extension>rec</extension>
|
||||
</type>
|
||||
<type name="video/wmv">
|
||||
<extension>wmv</extension>
|
||||
|
|
Loading…
Reference in New Issue