mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 00:38:52 -05:00
* upper list is based on xattr metadata, while lower list is just the fallback file object, when matching directly to xattr metadata
This commit is contained in:
parent
5a8bcba4f1
commit
c29be071cf
@ -308,12 +308,19 @@ public class RenamePanel extends JComponent {
|
||||
try {
|
||||
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||
|
||||
ArrayList<File> files = new ArrayList<File>(renameModel.files());
|
||||
ArrayList<Object> objects = new ArrayList<Object>(files.size());
|
||||
List<File> files = new ArrayList<File>(renameModel.files());
|
||||
List<Object> objects = new ArrayList<Object>(files.size());
|
||||
List<File> objectsTail = new ArrayList<File>();
|
||||
for (File file : files) {
|
||||
Object metaObject = MediaDetection.readMetaInfo(file);
|
||||
objects.add(metaObject != null ? metaObject : file);
|
||||
if (metaObject != null) {
|
||||
objects.add(metaObject); // upper list is based on xattr metadata
|
||||
} else {
|
||||
objectsTail.add(file); // lower list is just the fallback file object
|
||||
}
|
||||
}
|
||||
objects.addAll(objectsTail);
|
||||
|
||||
renameModel.clear();
|
||||
renameModel.addAll(objects, files);
|
||||
} finally {
|
||||
|
Loading…
Reference in New Issue
Block a user