OSDN Git Service

プロファイルからコメント取得用情報を削除
authoryukihane <yukihane.feather@gmail.com>
Fri, 19 Aug 2011 22:13:31 +0000 (07:13 +0900)
committeryukihane <yukihane.feather@gmail.com>
Fri, 19 Aug 2011 22:13:31 +0000 (07:13 +0900)
frontend/src/saccubus/converter/Converter.java
frontend/src/saccubus/converter/classic/profile/InputFileSetting.java
frontend/src/saccubus/converter/classic/profile/Profile.java
frontend/src/saccubus/prompt/Prompt.java
frontend/src/saccubus/properties/SProperties.java
frontend/src/yukihane/saccubus/converter/profile/CommentProfile.java
frontend/src/yukihane/saccubus/converter/profile/Profile.java

index 78947d2..2d1b4c3 100644 (file)
@@ -156,8 +156,8 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
         FileInstanciator.InstanciationType videoType = new FileInstanciator.InstanciationType(profile.getVideoSetting());
 
         FileInstanciator.CommentInstanciationType commentType = new FileInstanciator.CommentInstanciationType(profile.
-                getCommentSetting(), profile.getCommentGetInfo().isSelfAdjustCommentNum(), profile.getCommentGetInfo().
-                getBackComment(), profile.getCommentGetInfo().isReduceComment());
+                getCommentSetting(), profile.getCommentSetting().getCommentGetInfo().isSelfAdjustCommentNum(), profile.getCommentSetting().getCommentGetInfo().
+                getBackComment(), profile.getCommentSetting().getCommentGetInfo().isReduceComment());
 
         FileInstanciator.InstanciationType tcommType = new FileInstanciator.InstanciationType(
                 profile.getCommentSetting());
index a7e7d2f..7ac1413 100644 (file)
@@ -1,6 +1,7 @@
 /* $Id$ */
 package saccubus.converter.classic.profile;
 
+import yukihane.saccubus.converter.profile.CommentGetInfo;
 import yukihane.saccubus.converter.profile.CommentProfile;
 import yukihane.saccubus.converter.profile.VideoProfile;
 
@@ -13,22 +14,26 @@ public class InputFileSetting implements yukihane.saccubus.converter.profile.Inp
     private final SFile file;
     private final boolean download;
     private final boolean delete;
+    private final CommentGetInfo commentGetInfo;
 
     /**
      * @param file 対象ファイル.
      * @param download ダウンロードする必要があればtrue, ローカルファイルを用いるのであればfalse.
      * @param delete 変換後にファイルを削除するのであればtrue, 残したままにするのであればfalse.
      */
-    public InputFileSetting(SFile file, boolean download, boolean delete) {
+    public InputFileSetting(SFile file, boolean download, boolean delete, CommentGetInfo cominfo) {
         this.file = file;
         this.download = download;
         this.delete = delete;
+        this.commentGetInfo = cominfo;
     }
 
+    @Override
     public SFile getFile() {
         return file;
     }
 
+    @Override
     public boolean isDownload() {
         return download;
     }
@@ -36,4 +41,9 @@ public class InputFileSetting implements yukihane.saccubus.converter.profile.Inp
     public boolean isDelete() {
         return delete;
     }
+
+    @Override
+    public CommentGetInfo getCommentGetInfo() {
+        return commentGetInfo;
+    }
 }
index d503912..4c85331 100644 (file)
@@ -67,7 +67,6 @@ public class Profile implements yukihane.saccubus.converter.profile.Profile {
         return outputFileSetting;
     }
 
-    @Override
     public CommentGetInfo getCommentGetInfo() {
         return commentGetInfo;
     }
index c9d8e73..e2f7fb1 100644 (file)
@@ -139,9 +139,9 @@ public class Prompt {
 
         FfmpegOption newFfmpegOption = new FfmpegOption(ffmpeg.getFfmpegOption().getExtOption(), "", "", ff, "", false,
                 "", "", false);
-        InputFileSetting newVideoSetting = new InputFileSetting(new SFile(true, new File(video)), false, false);
-        InputFileSetting newCommentSetting = new InputFileSetting(new SFile(true, new File(comm)), false, false);
-        InputFileSetting newTcommentSetting = new InputFileSetting(new SFile(true, new File(tcomm)), false, false);
+        InputFileSetting newVideoSetting = new InputFileSetting(new SFile(true, new File(video)), false, false, commentGetInfo);
+        InputFileSetting newCommentSetting = new InputFileSetting(new SFile(true, new File(comm)), false, false, commentGetInfo);
+        InputFileSetting newTcommentSetting = new InputFileSetting(new SFile(true, new File(tcomm)), false, false, commentGetInfo);
         OutputFileSetting newOutputFileSetting = new OutputFileSetting(new SFile(true, new File(output)), true, false,
                 true, true);
         Ffmpeg newFfmpeg = new Ffmpeg(ffmpeg.getFfmpeg(), ffmpeg.getVhook(), newFfmpegOption, ffmpeg.isVhookDisabled(), ffmpeg.
index 259e864..a2117e0 100644 (file)
@@ -142,7 +142,8 @@ public class SProperties {
             // Nicobrowserダウンロードファイルは削除対象にならない.
             boolean delete = setting.isDeleteAfterConvert() && (setting.getProcessKind() != VideoSaveKind.NICOBROWSER);
 
-            return new InputFileSetting(videoFile, (setting.getProcessKind() == VideoSaveKind.SAVE), delete);
+            return new InputFileSetting(videoFile, (setting.getProcessKind() == VideoSaveKind.SAVE), delete,
+                    buildCommentGetInfo());
         }
 
         private InputFileSetting buildCommentSetting() {
@@ -151,7 +152,8 @@ public class SProperties {
 
         private CommentGetInfo buildCommentGetInfo() {
             final InputCommentSetting setting = getInputCommentSetting();
-            return new CommentGetInfo(setting.isSelfAdjustNumOfComment(), setting.getNumOfComment(), setting.isReduceComment());
+            return new CommentGetInfo(setting.isSelfAdjustNumOfComment(), setting.getNumOfComment(), setting.
+                    isReduceComment());
         }
 
         private InputFileSetting buildTcommentSetting() {
@@ -161,7 +163,8 @@ public class SProperties {
         private InputFileSetting createCommentSetting(saccubus.properties.InputFileSetting<Boolean> setting) {
             SFile file = createSFile(setting);
 
-            return new InputFileSetting(file, setting.getProcessKind().booleanValue(), setting.isDeleteAfterConvert());
+            return new InputFileSetting(file, setting.getProcessKind().booleanValue(), setting.isDeleteAfterConvert(),
+                    buildCommentGetInfo());
 
         }
 
index b21d876..e032fa4 100644 (file)
@@ -5,4 +5,6 @@ package yukihane.saccubus.converter.profile;
  * @author yuki
  */
 public interface CommentProfile extends InputFileSetting {
+
+    CommentGetInfo getCommentGetInfo();
 }
index 04caecb..1324e0b 100644 (file)
@@ -16,8 +16,6 @@ public interface Profile {
 
     OutputProfile getOutputFileSetting();
 
-    CommentGetInfo getCommentGetInfo();
-
     boolean needsConvert();
 
     Ffmpeg getFfmpeg();