Compare commits

..

No commits in common. "bf3543d47fe2548732ecc07b574012c443fb04cb" and "498ceec658a8d29b5e22ced7c285e60262ba6b63" have entirely different histories.

3 changed files with 3 additions and 31 deletions

View file

@ -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"]

View file

@ -142,7 +142,6 @@ router.post('/', async function(req, res, next) {
video.on('error', function(err) { video.on('error', function(err) {
console.error(err); console.error(err);
progress[data.uuid] = 0;
res.json({ error: err.stderr}); res.json({ error: err.stderr});
}); });

View file

@ -224,13 +224,12 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
CheckProgress(); CheckProgress();
}, 1000); }, 1000);
// Définissez ce qui se passe si la soumission s'est opérée avec succès
xhttp.addEventListener("load", function(event) { xhttp.addEventListener("load", function(event) {
const json = JSON.parse(event.target.responseText); const json = JSON.parse(event.target.responseText);
console.log(json); console.log(json);
if (json.error) { if (json.error) {
clearInterval(progress); alert(json.error);
document.getElementById('progress').innerHTML = '';
alert(json.error);
} else { } else {
const url = json.url; const url = json.url;
@ -251,6 +250,7 @@ Come take a look here https://git.namejeff.xyz/Supositware/jeff-downloader for a
}, 500) }, 500)
}); });
// Definissez ce qui se passe en cas d'erreur
xhttp.addEventListener("error", function(event) { xhttp.addEventListener("error", function(event) {
clearInterval(progress); clearInterval(progress);
document.getElementById('progress').innerHTML = ''; 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) { xhttp.addEventListener("error", function(event) {
clearInterval(progress);
document.getElementById('progress').innerHTML = '';
alert('whoops, something gone wrong');
console.error(event.target.responseText); console.error(event.target.responseText);
}); });
} }