${libs.Commons-Collections.classpath}:\\r
${libs.toplink.classpath}:\\r
${libs.H2_DB.classpath}:\\r
- ${libs.Commons-CLI.classpath}:\\r
- ${libs.HttpComponents.classpath}\r
+ ${libs.Commons-CLI.classpath}\r
# Space-separated list of extra javac options\r
javac.compilerargs=\r
javac.deprecation=true\r
${build.classes.dir}:\\r
${libs.Rome.classpath}:\\r
${libs.groovy-all.classpath}:\\r
- ${libs.NekoHtml.classpath}\r
+ ${libs.NekoHtml.classpath}:\\r
+ ${libs.HttpComponents.classpath}\r
run.jvmargs=-Djava.util.logging.config.file=inqubuslogging.properties\r
run.test.classpath=\\r
${javac.test.classpath}:\\r
import java.io.File;
import java.io.IOException;
-import java.net.URISyntaxException;
import java.util.Date;
import java.util.logging.Logger;
import nicobrowser.GetFlvResult;
import nicobrowser.ProgressListener;
import nicobrowser.WayBackInfo;
import nicobrowser.entity.NicoContent.Status;
-import org.apache.http.HttpException;
import saccubus.worker.Worker;
import saccubus.worker.WorkerListener;
import saccubus.worker.profile.CommentProfile;
* @param listener
* @param flag
*/
- public Download(DownloadProfile profile, String videoId, WorkerListener<DownloadResult, DownloadProgress> listener, int wait) {
+ public Download(DownloadProfile profile, String videoId, WorkerListener<DownloadResult, DownloadProgress> listener,
+ int wait) {
super(listener);
this.videoId = videoId;
this.profile = profile;
* @throws IOException ログイン失敗.
* @throws InterruptedException ログイン失敗.
*/
- // TODO HttpException を投げるのをやめたい. コンパイル時にHttpComponentが必要になるので.
- private NicoHttpClient createClientAndLogin() throws IOException, InterruptedException, HttpException {
+ private NicoHttpClient createClientAndLogin() throws IOException, InterruptedException {
final NicoHttpClient client = createClient(profile.getProxyProfile());
- final boolean hasLogin;
- try {
- hasLogin = client.login(profile.getLoginInfo().getMail(), profile.getLoginInfo().getPassword());
- if (!hasLogin) {
- throw new IOException("login fail");
- }
- } catch (URISyntaxException ex) {
- throw new IOException("login fail", ex);
+
+ final boolean hasLogin = client.login(profile.getLoginInfo().getMail(), profile.getLoginInfo().getPassword());
+ if (!hasLogin) {
+ throw new IOException("login fail");
}
+
return client;
}
synchronized (timeLockObj) {
final long now = new Date().getTime();
final long needSleep = (waitDownload * 1000L) - (now - lastStartTime);
- if(needSleep > 0L) {
+ if (needSleep > 0L) {
publish(new DownloadProgress(DownloadStatus.PROCESS, -1.0, "過剰アクセス抑制待機 " + needSleep / 1000));
Thread.sleep(needSleep);
}