mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-04 16:35:08 -05:00
* allow srt pass-through in GUI as well when only encoding is changed, not the format
This commit is contained in:
parent
bbee491b38
commit
9f618efa2f
@ -53,6 +53,7 @@ import ca.odell.glazedlists.swing.TextComponentMatcherEditor;
|
|||||||
|
|
||||||
import net.miginfocom.swing.MigLayout;
|
import net.miginfocom.swing.MigLayout;
|
||||||
import net.sourceforge.filebot.ResourceManager;
|
import net.sourceforge.filebot.ResourceManager;
|
||||||
|
import net.sourceforge.filebot.subtitle.SubtitleFormat;
|
||||||
import net.sourceforge.filebot.ui.panel.subtitle.SubtitlePackage.Download.Phase;
|
import net.sourceforge.filebot.ui.panel.subtitle.SubtitlePackage.Download.Phase;
|
||||||
import net.sourceforge.filebot.ui.transfer.DefaultTransferHandler;
|
import net.sourceforge.filebot.ui.transfer.DefaultTransferHandler;
|
||||||
import net.sourceforge.filebot.vfs.MemoryFile;
|
import net.sourceforge.filebot.vfs.MemoryFile;
|
||||||
@ -332,7 +333,8 @@ class SubtitleDownloadComponent extends JComponent {
|
|||||||
sf.setSelectedFile(new File(name + "." + ext));
|
sf.setSelectedFile(new File(name + "." + ext));
|
||||||
|
|
||||||
if (sf.showSaveDialog(getWindow(this)) == JFileChooser.APPROVE_OPTION) {
|
if (sf.showSaveDialog(getWindow(this)) == JFileChooser.APPROVE_OPTION) {
|
||||||
writeFile(exportSubtitles(file, sf.getSelectedFormat(), sf.getTimingOffset(), sf.getSelectedEncoding()), sf.getSelectedFile());
|
SubtitleFormat targetFormat = sf.getSelectedFormat().getFilter().accept(file.getName()) ? null : sf.getSelectedFormat();
|
||||||
|
writeFile(exportSubtitles(file, targetFormat, sf.getTimingOffset(), sf.getSelectedEncoding()), sf.getSelectedFile());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// multiple files
|
// multiple files
|
||||||
@ -350,7 +352,8 @@ class SubtitleDownloadComponent extends JComponent {
|
|||||||
String name = validateFileName(getNameWithoutExtension(file.getName()));
|
String name = validateFileName(getNameWithoutExtension(file.getName()));
|
||||||
File destination = new File(folder, name + "." + ext);
|
File destination = new File(folder, name + "." + ext);
|
||||||
|
|
||||||
writeFile(exportSubtitles(file, sf.getSelectedFormat(), sf.getTimingOffset(), sf.getSelectedEncoding()), destination);
|
SubtitleFormat targetFormat = sf.getSelectedFormat().getFilter().accept(file.getName()) ? null : sf.getSelectedFormat();
|
||||||
|
writeFile(exportSubtitles(file, targetFormat, sf.getTimingOffset(), sf.getSelectedEncoding()), destination);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user