Fixed issue where pip was missing in Docker

Temp twitch chat files now get auto removed
This commit is contained in:
Isaac Abadi
2022-06-21 01:51:32 -04:00
parent 9d1624d569
commit cddd280206
2 changed files with 6 additions and 2 deletions

View File

@@ -49,7 +49,7 @@ RUN npm config set strict-ssl false && \
FROM base
RUN npm install -g pm2 && \
apt update && \
apt install -y --no-install-recommends gosu python3-minimal python-is-python3 atomicparsley && \
apt install -y --no-install-recommends gosu python3-minimal python-is-python3 python-pip atomicparsley && \
apt clean && \
rm -rf /var/lib/apt/lists/*
RUN pip install tcd

View File

@@ -17,7 +17,9 @@ async function getCommentsForVOD(clientID, clientSecret, vodId) {
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 => {
return {
timestamp: comment_obj.content_offset_seconds,
@@ -28,6 +30,8 @@ async function getCommentsForVOD(clientID, clientSecret, vodId) {
}
});
fs.unlinkSync(temp_chat_path);
return new_json;
}