Compare commits
No commits in common. "bf3543d47fe2548732ecc07b574012c443fb04cb" and "498ceec658a8d29b5e22ced7c285e60262ba6b63" have entirely different histories.
bf3543d47f
...
498ceec658
3 changed files with 3 additions and 31 deletions
24
Dockerfile
24
Dockerfile
|
@ -1,24 +0,0 @@
|
|||
# My first docker hope it isn't too bad :)
|
||||
FROM node:14
|
||||
|
||||
WORKDIR /var/www/jeffdownloader/
|
||||
|
||||
RUN git clone https://git.namejeff.xyz/Supositware/jeff-downloader.git .
|
||||
|
||||
RUN git checkout progress
|
||||
|
||||
RUN npm install
|
||||
|
||||
RUN npm i -g pm2
|
||||
|
||||
RUN echo "[]" > proxy/proxy.json
|
||||
|
||||
RUN NODE_ENV=production
|
||||
|
||||
RUN PORT=3333
|
||||
|
||||
RUN apt-get update && apt-get install -y ffmpeg
|
||||
|
||||
EXPOSE 3333
|
||||
|
||||
CMD ["pm2-runtime", "bin/www"]
|
|
@ -142,7 +142,6 @@ router.post('/', async function(req, res, next) {
|
|||
|
||||
video.on('error', function(err) {
|
||||
console.error(err);
|
||||
progress[data.uuid] = 0;
|
||||
res.json({ error: err.stderr});
|
||||
});
|
||||
|
||||
|
|
|
@ -224,12 +224,11 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|||
CheckProgress();
|
||||
}, 1000);
|
||||
|
||||
// Définissez ce qui se passe si la soumission s'est opérée avec succès
|
||||
xhttp.addEventListener("load", function(event) {
|
||||
const json = JSON.parse(event.target.responseText);
|
||||
console.log(json);
|
||||
if (json.error) {
|
||||
clearInterval(progress);
|
||||
document.getElementById('progress').innerHTML = '';
|
||||
alert(json.error);
|
||||
} else {
|
||||
const url = json.url;
|
||||
|
@ -251,6 +250,7 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|||
}, 500)
|
||||
});
|
||||
|
||||
// Definissez ce qui se passe en cas d'erreur
|
||||
xhttp.addEventListener("error", function(event) {
|
||||
clearInterval(progress);
|
||||
document.getElementById('progress').innerHTML = '';
|
||||
|
@ -272,9 +272,6 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
|
|||
});
|
||||
|
||||
xhttp.addEventListener("error", function(event) {
|
||||
clearInterval(progress);
|
||||
document.getElementById('progress').innerHTML = '';
|
||||
alert('whoops, something gone wrong');
|
||||
console.error(event.target.responseText);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue