}
public File getTCommentFile(VideoInfo vi, String fileName) throws Exception {
- return downloadComment(vi, fileName, true, null);
+ return downloadComment(vi, fileName, true, null, true);
}
private File downloadComment(VideoInfo vi, String fileName, boolean isTcomm, WayBackInfo wayback) throws Exception {
+ return downloadComment(vi, fileName, isTcomm, wayback, false);
+ }
+
+ private File downloadComment(VideoInfo vi, String fileName, boolean isTcomm, WayBackInfo wayback, boolean oldVersion)
+ throws Exception {
HttpResponse response = null;
BufferedOutputStream bos = null;
try {
final HttpPost post = new HttpPost(vi.getMessageUrl().toString());
- final String param = createCommendDownloadParameter20101222(vi, isTcomm, wayback);
+ final String param;
+ if (oldVersion || isTcomm) {
+ param = createCommendDownloadParameter20101222(vi, isTcomm, wayback);
+ } else {
+ param = createCommendDownloadParameter(vi, wayback);
+ }
final StringEntity se = new StringEntity(param);
post.setEntity(se);
response = http.execute(post);
}
}
- private String createCommendDownloadParameter(VideoInfo vi, boolean isTcomm, WayBackInfo wayback) {
+ private String createCommendDownloadParameter(VideoInfo vi, WayBackInfo wayback) {
final String quote = "\"";
final Map<String, String> th = new HashMap<String, String>();
th.put("thread", vi.getThreadId());