* 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 {
|
try {
|
||||||
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
getWindow(evt.getSource()).setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
|
||||||
|
|
||||||
ArrayList<File> files = new ArrayList<File>(renameModel.files());
|
List<File> files = new ArrayList<File>(renameModel.files());
|
||||||
ArrayList<Object> objects = new ArrayList<Object>(files.size());
|
List<Object> objects = new ArrayList<Object>(files.size());
|
||||||
|
List<File> objectsTail = new ArrayList<File>();
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
Object metaObject = MediaDetection.readMetaInfo(file);
|
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.clear();
|
||||||
renameModel.addAll(objects, files);
|
renameModel.addAll(objects, files);
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue