mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-15 08:31:30 +03:00
Updated twitch chat component to support user colors and to auto open if the chat has already been downloaded
This commit is contained in:
@@ -2037,6 +2037,8 @@ app.post('/api/getFile', optionalJwt, function (req, res) {
|
||||
if (!file && type) file = db.get(`files.${type}`).find({uid: uid}).value();
|
||||
}
|
||||
|
||||
// check if chat exists for twitch videos
|
||||
if (file['url'].includes('twitch.tv')) file['chat_exists'] = fs.existsSync(file['path'].substring(0, file['path'].length - 4) + '.twitch_chat.json');
|
||||
|
||||
if (file) {
|
||||
res.send({
|
||||
|
||||
@@ -28,7 +28,8 @@ async function getCommentsForVOD(clientID, vodId) {
|
||||
created_at: acctCreated
|
||||
},
|
||||
message: {
|
||||
body: msg
|
||||
body: msg,
|
||||
user_color: user_color
|
||||
}
|
||||
} = c;
|
||||
|
||||
@@ -49,7 +50,8 @@ async function getCommentsForVOD(clientID, vodId) {
|
||||
timestamp: timestamp,
|
||||
timestamp_str: timestamp_str,
|
||||
name: name,
|
||||
message: msg
|
||||
message: msg,
|
||||
user_color: user_color
|
||||
});
|
||||
// let line = `${timestamp},${msgCreated.format(tsFormat)},${name},${_id},"${msg.replace(/"/g, '""')}",${acctCreated.format(tsFormat)}`;
|
||||
// return line;
|
||||
|
||||
Reference in New Issue
Block a user