OSDN Git Service

コメント取得数自動設定
authoryukihane <yukihane.feather@gmail.com>
Mon, 29 Aug 2011 15:33:46 +0000 (00:33 +0900)
committeryukihane <yukihane.feather@gmail.com>
Mon, 29 Aug 2011 15:33:46 +0000 (00:33 +0900)
src/nicobrowser/NicoHttpClient.java

index 9447c1d..619f41b 100644 (file)
@@ -805,7 +805,8 @@ public class NicoHttpClient {
 
     public File getCommentFile(VideoInfo vi, String fileName, WayBackInfo wayback, int commentNum, boolean oldVersion)
             throws Exception {
-        return downloadComment(vi, fileName, false, wayback, Integer.valueOf(commentNum), oldVersion);
+        final Integer num = (commentNum >= 0) ? Integer.valueOf(commentNum) : null;
+        return downloadComment(vi, fileName, false, wayback, num, oldVersion);
     }
 
     public File getCommentFile(VideoInfo vi, String fileName) throws Exception {