OSDN Git Service

行うべき処理が無い場合にはメッセージを出力し,キューには追加しない No.26342
[coroid/inqubus.git] / frontend / src / yukihane / inqubus / gui / MainFrame.java
index ba2e997..8e03253 100644 (file)
@@ -627,9 +627,13 @@ public class MainFrame extends JFrame {
                 thumbRepository.request(downProf.getProxyProfile(), tempDir, id);
 
                 final RequestProcess rp = new RequestProcess(downProf, id, convProf);
-                taskManager.add(rp);
-                targetModel.addTarget(new Target(rp));
-                initInputPanel();
+                final boolean res = taskManager.add(rp);
+                if (res) {
+                    targetModel.addTarget(new Target(rp));
+                    initInputPanel();
+                } else {
+                    fldInputMessage.setText("行うべき処理がありません");
+                }
             } catch (Throwable th) {
                 logger.error(null, th);
                 JOptionPane.showMessageDialog(MainFrame.this, th.getMessage(), "中断しました", JOptionPane.ERROR_MESSAGE);
@@ -711,6 +715,7 @@ public class MainFrame extends JFrame {
     // End of variables declaration//GEN-END:variables
 
     private void initInputPanel() {
+        fldInputMessage.setText("");
         initMainTab();
         initFfmpegTab();
         tbpInput.setSelectedIndex(0);
@@ -932,6 +937,7 @@ public class MainFrame extends JFrame {
 
     private class InqubusCommentProfile extends ConfigCommentProfile {
         private final boolean download;
+        private final boolean ownerCommentOnly;
         private final File dir;
         private final String fileName;
         private final File localFile;
@@ -947,10 +953,12 @@ public class MainFrame extends JFrame {
                 this.dir = new File(p.getCommentDir());
                 this.fileName = fldComment.getText();
                 this.localFile = null;
+                this.ownerCommentOnly = cbOwnerComment.isSelected();
             } else {
                 this.dir = null;
                 this.fileName = null;
                 this.localFile = new File(fldComment.getText());
+                this.ownerCommentOnly = false;
             }
 
             if(cbBackLog.isSelected()) {
@@ -972,6 +980,11 @@ public class MainFrame extends JFrame {
         }
 
         @Override
+        public boolean isOwnerCommentOnly(){
+            return this.ownerCommentOnly;
+        }
+
+        @Override
         public File getDir() {
             return this.dir;
         }