OSDN Git Service

メソッド名の誤字修正
[coroid/inqubus.git] / frontend / src / saccubus / converter / filegetter / WebFileInstanciator.java
index e53a5b9..2dd64d2 100644 (file)
@@ -8,9 +8,9 @@ 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.util.WayBackTimeParser;
+import yukihane.inqubus.saccubus_adapter.NicoBrowserAdapter;
 
 /**
  * 動画ファイル, コメントファイルなど必要なファイルのうち, 1つでもダウンロード処理を必要とする場合のインスタンス化クラス.
@@ -45,8 +45,7 @@ public class WebFileInstanciator extends FileInstanciator {
             host = null;
             port = -1;
         }
-        // TODO Implを直接newしている
-        client = new NicoClientImpl(li.getMail(), li.getPass(), stopFlag, host, port) {
+        client = new NicoBrowserAdapter(li.getMail(), li.getPass(), stopFlag, host, port) {
         };
 
         if (!client.isLoggedIn()) {
@@ -57,27 +56,27 @@ public class WebFileInstanciator extends FileInstanciator {
             videoInfo = client.getVideoInfo(tag);
             if (StringUtils.isNotBlank(time)) {
                 System.out.print("Setting wayback time...");
-                final String waybacktime = WayBackTimeParser.parse(time);
+                final long waybacktime = WayBackTimeParser.parse(time);
                 String waybackkey = client.getWayBackKey(videoInfo);
                 commentInfo = new CommentInfo(waybackkey, waybacktime);
             }else{
-                commentInfo = CommentInfo.DEFAULT;
+                commentInfo = null;
             }
 
         } catch (IOException ex) {
             throw new IOException(tag + "の情報の取得に失敗", ex);
         }
 
-        if (videoType.isDoanload()) {
+        if (videoType.isDownload()) {
             setVideoFileGetter(new VideoFileWebGetter(client, videoInfo));
         }
 
-        if (commentType.isDoanload()) {
+        if (commentType.isDownload()) {
             setCommentFileGetter(new CommentFileWebGetter(client, videoInfo, commentInfo, commentType.isAutoCommentNum(),
                     commentType.getBackComment()));
         }
 
-        if (tcommType.isDoanload()) {
+        if (tcommType.isDownload()) {
             setTcommFileGetter(new TcommFileWebGetter(client, videoInfo));
         }
     }