* keep full path when loading torrent file entries
This commit is contained in:
parent
392cb9346f
commit
3faa210ff1
|
@ -146,7 +146,7 @@ class NamesListTransferablePolicy extends FileTransferablePolicy {
|
|||
Torrent torrent = new Torrent(file);
|
||||
|
||||
for (Torrent.Entry entry : torrent.getFiles()) {
|
||||
values.add(new SimpleFileInfo(entry.getName(), entry.getLength()));
|
||||
values.add(new SimpleFileInfo(entry.getPath(), entry.getLength()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,6 +65,7 @@ import net.filebot.ui.transfer.BackgroundFileTransferablePolicy;
|
|||
import net.filebot.util.PreferencesMap.PreferencesEntry;
|
||||
import net.filebot.util.ui.ActionPopup;
|
||||
import net.filebot.util.ui.LoadingOverlayPane;
|
||||
import net.filebot.vfs.FileInfo;
|
||||
import net.filebot.web.AudioTrack;
|
||||
import net.filebot.web.AudioTrackFormat;
|
||||
import net.filebot.web.Episode;
|
||||
|
@ -141,8 +142,10 @@ public class RenamePanel extends JComponent {
|
|||
// restore custom music formatter
|
||||
renameModel.useFormatter(File.class, new ExpressionFormatter(persistentFileFormat.getValue(), new FileNameFormat(), File.class));
|
||||
} catch (Exception e) {
|
||||
// use default FileInfo formatter as fallback
|
||||
} finally {
|
||||
// use default filename formatter
|
||||
renameModel.useFormatter(File.class, new FileNameFormatter(renameModel.preserveExtension()));
|
||||
renameModel.useFormatter(FileInfo.class, new FileNameFormatter(renameModel.preserveExtension()));
|
||||
}
|
||||
|
||||
RenameListCellRenderer cellrenderer = new RenameListCellRenderer(renameModel);
|
||||
|
@ -606,7 +609,7 @@ public class RenamePanel extends JComponent {
|
|||
renameModel.setPreserveExtension(!activate);
|
||||
|
||||
// use different file name formatter
|
||||
renameModel.useFormatter(File.class, new FileNameFormatter(renameModel.preserveExtension()));
|
||||
renameModel.useFormatter(FileInfo.class, new FileNameFormatter(renameModel.preserveExtension()));
|
||||
|
||||
// display changed state
|
||||
filesList.repaint();
|
||||
|
|
Loading…
Reference in New Issue