|
|
@ -17,7 +17,9 @@ async function getCommentsForVOD(clientID, clientSecret, vodId) {
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const raw_json = fs.readJSONSync(path.join('appdata', `${vodId}.json`));
|
|
|
|
const temp_chat_path = path.join('appdata', `${vodId}.json`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const raw_json = fs.readJSONSync(temp_chat_path);
|
|
|
|
const new_json = raw_json.comments.map(comment_obj => {
|
|
|
|
const new_json = raw_json.comments.map(comment_obj => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
timestamp: comment_obj.content_offset_seconds,
|
|
|
|
timestamp: comment_obj.content_offset_seconds,
|
|
|
@ -28,6 +30,8 @@ async function getCommentsForVOD(clientID, clientSecret, vodId) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fs.unlinkSync(temp_chat_path);
|
|
|
|
|
|
|
|
|
|
|
|
return new_json;
|
|
|
|
return new_json;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|