String waybackkey = client.getWayBackKey(videoInfo);
commentInfo = new CommentInfo(waybackkey, waybacktime);
}else{
- commentInfo = CommentInfo.DEFAULT;
+ commentInfo = null;
}
} catch (IOException ex) {
* @author yuki
*/
public class CommentInfo {
- public static final CommentInfo DEFAULT = new CommentInfo();
private final String wayBackKey;
private final String wayBackTime;
- private CommentInfo() {
- this("0", "0");
- }
-
public CommentInfo(String wayBackKey, String wayBackTime) {
this.wayBackKey = wayBackKey;
this.wayBackTime = wayBackTime;
private File downloadComment(int back_comment, final File file, VideoInfo vi, final TextProgressListener status,
boolean isTcomm) throws NumberFormatException {
- return downloadComment(back_comment, file, vi, CommentInfo.DEFAULT, status, isTcomm);
+ return downloadComment(back_comment, file, vi, null, status, isTcomm);
}
private File downloadComment(int back_comment, final File file, VideoInfo vi, CommentInfo ci, final TextProgressListener status,
@Override
public File getComment(VideoInfo videoInfo, CommentInfo commentInfo, File file, TextProgressListener listener,
- int com) {
+ int commentNum) {
try {
- WayBackInfo wbi = new WayBackInfo(commentInfo.getWayBackKey(), commentInfo.getWayBackTime());
- return client.getCommentFile(nicoBrowserVi, file.getPath(), wbi);
+ final WayBackInfo wbi = (commentInfo != null) ? new WayBackInfo(commentInfo.getWayBackKey(), commentInfo.
+ getWayBackTime()) : null;
+ return client.getCommentFile(nicoBrowserVi, file.getPath(), wbi, commentNum);
} catch (Exception ex) {
logger.log(Level.SEVERE, "コメント取得失敗", ex);
}