OSDN Git Service

WayBackKey, WayBackTimeをNicoCacneImplのフィールドから削除しコメント用情報クラスに移す.
[coroid/inqubus.git] / frontend / src / saccubus / converter / filegetter / CommentFileWebGetter.java
index 11ee32b..697d599 100644 (file)
@@ -6,6 +6,7 @@ package saccubus.converter.filegetter;
 
 import java.io.File;
 import java.io.IOException;
+import saccubus.net.CommentInfo;
 import saccubus.net.NicoClient;
 import saccubus.net.TextProgressListener;
 import saccubus.net.VideoInfo;
@@ -18,11 +19,13 @@ public class CommentFileWebGetter extends TcommFileWebGetter {
 
     private final boolean autoCommentNum;
     private final int backComment;
+    private final CommentInfo commentInfo;
 
-    CommentFileWebGetter(NicoClient client, VideoInfo vi, boolean autoCommentNum, int backComment) {
+    CommentFileWebGetter(NicoClient client, VideoInfo vi, CommentInfo ci, boolean autoCommentNum, int backComment) {
         super(client, vi);
         this.autoCommentNum = autoCommentNum;
         this.backComment = backComment;
+        this.commentInfo = ci;
     }
 
     @Override
@@ -32,7 +35,7 @@ public class CommentFileWebGetter extends TcommFileWebGetter {
             com = getBackCommentFromLength(getVideoInfo(), com);
         }
 
-        File res = getClient().getComment(getVideoInfo(), file, listener, com);
+        File res = getClient().getComment(getVideoInfo(), getCommentInfo(), file, listener, com);
         if (res == null) {
             throw new IOException("コメントファイルのダウンロードに失敗しました。");
         }
@@ -53,4 +56,8 @@ public class CommentFileWebGetter extends TcommFileWebGetter {
                        return "1000";
                }
     }
+
+    private CommentInfo getCommentInfo() {
+        return commentInfo;
+    }
 }