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