OSDN Git Service

Merge branch 'master'
[coroid/inqubus.git] / frontend / src / saccubus / converter / filegetter / WebFileInstanciator.java
index 19c4343..b1e8e6c 100644 (file)
@@ -5,12 +5,13 @@ import java.io.IOException;
 import java.text.Normalizer;
 import org.apache.commons.lang.StringUtils;
 import saccubus.ConvertStopFlag;
-import saccubus.converter.profile.Proxy;
 import saccubus.net.CommentInfo;
 import saccubus.net.NicoClient;
 import saccubus.net.VideoInfo;
 import saccubus.util.WayBackTimeParser;
 import yukihane.inqubus.saccubus_adapter.NicoBrowserAdapter;
+import yukihane.saccubus.converter.profile.Proxy;
+import yukihane.saccubus.converter.profile.LoginInfo;
 
 /**
  * 動画ファイル, コメントファイルなど必要なファイルのうち, 1つでもダウンロード処理を必要とする場合のインスタンス化クラス.
@@ -28,6 +29,7 @@ public class WebFileInstanciator extends FileInstanciator {
             CommentInstanciationType commentType,
             InstanciationType tcommType,
             LoginInfo li,
+            Proxy proxy,
             String tag,
             String time) throws IOException {
         super(videoType, commentType, tcommType, tag);
@@ -38,9 +40,9 @@ public class WebFileInstanciator extends FileInstanciator {
 
         String host;
         int port;
-        if (li.getProxy() != Proxy.NO_PROXY) {
-            host = li.getProxy().getHost();
-            port = li.getProxy().getPort();
+        if (proxy.use()) {
+            host = proxy.getHost();
+            port = proxy.getPort();
         } else {
             host = null;
             port = -1;