Added archive path to options
This commit is contained in:
@@ -91,7 +91,6 @@ public class AudiobookRecorder extends JFrame {
|
||||
public Configuration sphinxConfig;
|
||||
public StreamSpeechRecognizer recognizer;
|
||||
|
||||
|
||||
public static AudiobookRecorder window;
|
||||
|
||||
void initSphinx() {
|
||||
@@ -2054,7 +2053,7 @@ public class AudiobookRecorder extends JFrame {
|
||||
String name = AudiobookRecorder.this.book.getName();
|
||||
File storageDir = new File(Options.get("path.storage"));
|
||||
File bookDir = new File(storageDir, name);
|
||||
File archiveDir = new File(storageDir, "archive");
|
||||
File archiveDir = new File(Options.get("path.archive"));
|
||||
|
||||
ArrayList<File> fileList = gatherFiles(bookDir);
|
||||
|
||||
@@ -2139,7 +2138,7 @@ public class AudiobookRecorder extends JFrame {
|
||||
}
|
||||
|
||||
public void openArchive() {
|
||||
JFileChooser jc = new JFileChooser(new File(Options.get("path.storage"), "archive"));
|
||||
JFileChooser jc = new JFileChooser(new File(Options.get("path.archive")));
|
||||
FileNameExtensionFilter filter = new FileNameExtensionFilter("Audiobook Archives", "abz");
|
||||
jc.addChoosableFileFilter(filter);
|
||||
jc.setFileFilter(filter);
|
||||
|
||||
@@ -22,6 +22,7 @@ public class Options extends JDialog {
|
||||
JComboBox<KVPair> bitDepth;
|
||||
JComboBox<KVPair> trimMethod;
|
||||
JTextField storageFolder;
|
||||
JTextField archiveFolder;
|
||||
JSpinner preChapterGap;
|
||||
JSpinner postChapterGap;
|
||||
JSpinner postSentenceGap;
|
||||
@@ -256,6 +257,7 @@ public class Options extends JDialog {
|
||||
playbackList = addDropdown(optionsPanel, "Playback device:", getPlaybackMixerList(), get("audio.playback.device"));
|
||||
addSeparator(optionsPanel);
|
||||
storageFolder = addFilePath(optionsPanel, "Storage folder:", get("path.storage"), true);
|
||||
archiveFolder = addFilePath(optionsPanel, "Archive folder:", get("path.archive"), true);
|
||||
|
||||
addSeparator(optionsPanel);
|
||||
|
||||
@@ -462,6 +464,7 @@ public class Options extends JDialog {
|
||||
defaultPrefs.put("catenation.post-paragraph", "2000");
|
||||
|
||||
defaultPrefs.put("path.storage", (new File(System.getProperty("user.home"), "Recordings")).toString());
|
||||
defaultPrefs.put("path.archive", (new File(new File(System.getProperty("user.home"), "Recordings"),"archive")).toString());
|
||||
defaultPrefs.put("path.ffmpeg", "");
|
||||
|
||||
defaultPrefs.put("audio.export.bitrate", "256000");
|
||||
@@ -598,6 +601,7 @@ public class Options extends JDialog {
|
||||
set("audio.recording.trim", ((KVPair)trimMethod.getSelectedItem()).key);
|
||||
set("audio.playback.device", ((KVPair)playbackList.getSelectedItem()).key);
|
||||
set("path.storage", storageFolder.getText());
|
||||
set("path.archive", archiveFolder.getText());
|
||||
set("path.ffmpeg", ffmpegLocation.getText());
|
||||
set("catenation.pre-chapter", preChapterGap.getValue());
|
||||
set("catenation.post-chapter", postChapterGap.getValue());
|
||||
|
||||
Reference in New Issue
Block a user