1 package saccubus.converter.filegetter;
4 import java.io.IOException;
5 import saccubus.net.CommentInfo;
6 import saccubus.net.NicoClient;
7 import saccubus.net.TextProgressListener;
8 import saccubus.net.VideoInfo;
14 public class CommentFileWebGetter extends TcommFileWebGetter {
16 private final boolean autoCommentNum;
17 private final int backComment;
18 private final boolean reduceComment;
19 private final CommentInfo commentInfo;
21 CommentFileWebGetter(NicoClient client, VideoInfo vi, CommentInfo ci, boolean autoCommentNum, int backComment, boolean reduceComment) {
23 this.autoCommentNum = autoCommentNum;
24 this.backComment = backComment;
25 this.reduceComment = reduceComment;
26 this.commentInfo = ci;
30 public File get(File file, TextProgressListener listener) throws IOException {
32 if (this.autoCommentNum) {
33 com = getVideoInfo().getBackCommentFromLength();
38 File res = getClient().getComment(getVideoInfo(), getCommentInfo(), file, listener, com, reduceComment);
40 throw new IOException("コメントファイルのダウンロードに失敗しました。");
45 private CommentInfo getCommentInfo() {