1 package saccubus.converter.filegetter;
4 import java.io.IOException;
5 import saccubus.net.NicoClient;
6 import saccubus.net.TextProgressListener;
7 import saccubus.net.VideoInfo;
13 public class CommentFileWebGetter extends TcommFileWebGetter {
15 private final boolean autoCommentNum;
16 private final int backComment;
18 CommentFileWebGetter(NicoClient client, VideoInfo vi, boolean autoCommentNum, int backComment) {
20 this.autoCommentNum = autoCommentNum;
21 this.backComment = backComment;
25 public File get(File file, TextProgressListener listener) throws IOException {
26 String com = Integer.toString(backComment);
27 if (this.autoCommentNum) {
28 com = getClient().getBackCommentFromLength(getVideoInfo(), com);
31 File res = getClient().getComment(getVideoInfo(), file, listener, com);
33 throw new IOException("コメントファイルのダウンロードに失敗しました。");