OSDN Git Service

コミット漏れ
[coroid/inqubus.git] / frontend / src / saccubus / converter / filegetter / FileInstanciator.java
index 3543d81..e9a8e7a 100644 (file)
@@ -6,8 +6,10 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import org.apache.commons.io.FilenameUtils;
 import saccubus.ConvertStopFlag;
-import saccubus.converter.profile.InputFileSetting;
+import yukihane.saccubus.converter.profile.InputFileSetting;
 import saccubus.net.TextProgressListener;
+import yukihane.saccubus.converter.profile.LoinProfile;
+import yukihane.saccubus.converter.profile.ProxyProfile;
 
 /**
  * ダウンロード処理を全く必要としない場合のファイルインスタンス化クラス.
@@ -40,12 +42,14 @@ public class FileInstanciator {
             InstanciationType videoType,
             CommentInstanciationType commentType,
             InstanciationType tcommType,
-            LoginInfo li,
-            String tag, String time) throws
+            LoinProfile li,
+            ProxyProfile proxy,
+            String tag,
+            long time) throws
             IOException {
         FileInstanciator getter;
-        if (videoType.isDoanload() || commentType.isDoanload() || tcommType.isDoanload()) {
-            getter = new WebFileInstanciator(stopFlag, videoType, commentType, tcommType, li, tag, time);
+        if (videoType.isDownload() || commentType.isDownload() || tcommType.isDownload()) {
+            getter = new WebFileInstanciator(stopFlag, videoType, commentType, tcommType, li, proxy, tag, time);
         } else {
             getter = new FileInstanciator(videoType, commentType, tcommType, tag);
         }
@@ -131,7 +135,7 @@ public class FileInstanciator {
      */
     public final File getTcommFile(TextProgressListener listener) throws IOException {
         File file = new FileLocator(tcommType.isAutoFileName(), tcommType.getInitFile(), getVideoIdWithBracket(),
-                getVideoTitle(), ".txml").getFile();
+                getVideoTitle(), ".xml").getFile();
         file = tcommFileGetter.get(file, listener);
         return file;
     }
@@ -155,7 +159,7 @@ public class FileInstanciator {
             this.initFile = fileSetting.getFile().getFile();
         }
 
-        public boolean isDoanload() {
+        public boolean isDownload() {
             return download;
         }
 
@@ -172,11 +176,14 @@ public class FileInstanciator {
 
         private final boolean autoCommentNum;
         private final int backComment;
+        private final boolean reduceComment;
 
-        public CommentInstanciationType(InputFileSetting fileSetting, boolean autoCommentNum, int backComment) {
+        public CommentInstanciationType(InputFileSetting fileSetting, boolean autoCommentNum, int backComment,
+                boolean reduceComment) {
             super(fileSetting);
             this.autoCommentNum = autoCommentNum;
             this.backComment = backComment;
+            this.reduceComment = reduceComment;
         }
 
         public boolean isAutoCommentNum() {
@@ -186,5 +193,9 @@ public class FileInstanciator {
         public int getBackComment() {
             return backComment;
         }
+
+        boolean isReduceComment() {
+            return reduceComment;
+        }
     }
 }