OSDN Git Service

WayBackKey, WayBackTimeをNicoCacneImplのフィールドから削除しコメント用情報クラスに移す.
[coroid/inqubus.git] / frontend / src / saccubus / converter / filegetter / WebFileInstanciator.java
index 35083db..bcda523 100644 (file)
@@ -5,6 +5,7 @@ import java.io.IOException;
 import java.text.Normalizer;
 import saccubus.ConvertStopFlag;
 import saccubus.converter.profile.Proxy;
 import java.text.Normalizer;
 import saccubus.ConvertStopFlag;
 import saccubus.converter.profile.Proxy;
+import saccubus.net.CommentInfo;
 import saccubus.net.NicoClient;
 import saccubus.net.NicoClientImpl;
 import saccubus.net.VideoInfo;
 import saccubus.net.NicoClient;
 import saccubus.net.NicoClientImpl;
 import saccubus.net.VideoInfo;
@@ -17,6 +18,7 @@ public class WebFileInstanciator extends FileInstanciator {
 
     private final NicoClient client;
     private final VideoInfo videoInfo;
 
     private final NicoClient client;
     private final VideoInfo videoInfo;
+    private final CommentInfo commentInfo;
 
     WebFileInstanciator(
             ConvertStopFlag stopFlag,
 
     WebFileInstanciator(
             ConvertStopFlag stopFlag,
@@ -49,7 +51,9 @@ public class WebFileInstanciator extends FileInstanciator {
         }
 
         try {
         }
 
         try {
-            videoInfo = client.getVideoInfo(tag, time);
+            videoInfo = client.getVideoInfo(tag);
+            commentInfo = client.getWayBackKey(videoInfo, time);
+
         } catch (IOException ex) {
             throw new IOException(tag + "の情報の取得に失敗", ex);
         }
         } catch (IOException ex) {
             throw new IOException(tag + "の情報の取得に失敗", ex);
         }
@@ -59,7 +63,7 @@ public class WebFileInstanciator extends FileInstanciator {
         }
 
         if (commentType.isDoanload()) {
         }
 
         if (commentType.isDoanload()) {
-            setCommentFileGetter(new CommentFileWebGetter(client, videoInfo, commentType.isAutoCommentNum(),
+            setCommentFileGetter(new CommentFileWebGetter(client, videoInfo, commentInfo, commentType.isAutoCommentNum(),
                     commentType.getBackComment()));
         }
 
                     commentType.getBackComment()));
         }