2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
5 package saccubus.converter.filegetter;
8 import java.io.IOException;
9 import saccubus.net.CommentInfo;
10 import saccubus.net.NicoClient;
11 import saccubus.net.TextProgressListener;
12 import saccubus.net.VideoInfo;
18 public class CommentFileWebGetter extends TcommFileWebGetter {
20 private final boolean autoCommentNum;
21 private final int backComment;
22 private final boolean reduceComment;
23 private final CommentInfo commentInfo;
25 CommentFileWebGetter(NicoClient client, VideoInfo vi, CommentInfo ci, boolean autoCommentNum, int backComment, boolean reduceComment) {
27 this.autoCommentNum = autoCommentNum;
28 this.backComment = backComment;
29 this.reduceComment = reduceComment;
30 this.commentInfo = ci;
34 public File get(File file, TextProgressListener listener) throws IOException {
36 if (this.autoCommentNum) {
37 com = getVideoInfo().getBackCommentFromLength();
42 File res = getClient().getComment(getVideoInfo(), getCommentInfo(), file, listener, com, reduceComment);
44 throw new IOException("コメントファイルのダウンロードに失敗しました。");
49 private CommentInfo getCommentInfo() {