mirror of
https://github.com/Tzahi12345/YoutubeDL-Material.git
synced 2026-04-25 19:23:20 +03:00
Compare commits
1 Commits
docker-ubu
...
fix-603
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e8ca9d843 |
10
Dockerfile
10
Dockerfile
@@ -2,9 +2,8 @@ FROM ubuntu:22.04 AS ffmpeg
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y software-properties-common
|
COPY docker-build.sh .
|
||||||
RUN add-apt-repository ppa:savoury1/ffmpeg4
|
RUN sh ./docker-build.sh
|
||||||
RUN add-apt-repository ppa:savoury1/ffmpeg5 && apt-get update && apt-get install -y ffmpeg
|
|
||||||
|
|
||||||
#--------------# Stage 2
|
#--------------# Stage 2
|
||||||
|
|
||||||
@@ -49,8 +48,7 @@ RUN apt-get update && apt-get -y install \
|
|||||||
python2 \
|
python2 \
|
||||||
python3 \
|
python3 \
|
||||||
gosu \
|
gosu \
|
||||||
atomicparsley \
|
atomicparsley && \
|
||||||
--no-install-recommends && \
|
|
||||||
apt-get install -f && \
|
apt-get install -f && \
|
||||||
apt-get autoremove --purge && \
|
apt-get autoremove --purge && \
|
||||||
apt-get autoremove && \
|
apt-get autoremove && \
|
||||||
@@ -73,5 +71,5 @@ COPY --chown=$UID:$GID --from=frontend [ "/build/backend/public/", "/app/public/
|
|||||||
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
COPY --chown=$UID:$GID [ "/backend/", "/app/" ]
|
||||||
|
|
||||||
EXPOSE 17442
|
EXPOSE 17442
|
||||||
# ENTRYPOINT [ "/app/entrypoint.sh" ]
|
ENTRYPOINT [ "/app/entrypoint.sh" ]
|
||||||
CMD [ "pm2-runtime", "pm2.config.js" ]
|
CMD [ "pm2-runtime", "pm2.config.js" ]
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ exports.updateYoutubeDL = async (latest_update_version) => {
|
|||||||
|
|
||||||
exports.verifyBinaryExistsLinux = () => {
|
exports.verifyBinaryExistsLinux = () => {
|
||||||
const details_json = fs.readJSONSync(CONSTS.DETAILS_BIN_PATH);
|
const details_json = fs.readJSONSync(CONSTS.DETAILS_BIN_PATH);
|
||||||
if (!is_windows && details_json && details_json['path'].includes('.exe')) {
|
if (!is_windows && details_json && details_json['path'] && details_json['path'].includes('.exe')) {
|
||||||
details_json['path'] = 'node_modules/youtube-dl/bin/youtube-dl';
|
details_json['path'] = 'node_modules/youtube-dl/bin/youtube-dl';
|
||||||
details_json['exec'] = 'youtube-dl';
|
details_json['exec'] = 'youtube-dl';
|
||||||
details_json['version'] = OUTDATED_VERSION;
|
details_json['version'] = OUTDATED_VERSION;
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
"ng": "ng",
|
"ng": "ng",
|
||||||
"start": "ng serve",
|
"start": "ng serve",
|
||||||
"build": "ng build --configuration production",
|
"build": "ng build --configuration production",
|
||||||
"prebuild": "node src/postbuild.js",
|
"prebuild": "node src/postbuild.mjs",
|
||||||
"heroku-postbuild": "npm install --prefix backend",
|
"heroku-postbuild": "npm install --prefix backend",
|
||||||
"test": "ng test",
|
"test": "ng test",
|
||||||
"lint": "ng lint",
|
"lint": "ng lint",
|
||||||
|
|||||||
@@ -1,43 +0,0 @@
|
|||||||
const fs = require('fs-extra');
|
|
||||||
const path = require('path');
|
|
||||||
const xliffToJSON = require('xliff-to-json');
|
|
||||||
|
|
||||||
async function recFindByExt(base,ext,files,result)
|
|
||||||
{
|
|
||||||
files = files || (await fs.readdir(base))
|
|
||||||
result = result || []
|
|
||||||
|
|
||||||
for (const file of files) {
|
|
||||||
var newbase = path.join(base,file)
|
|
||||||
if ( (await fs.stat(newbase)).isDirectory() )
|
|
||||||
{
|
|
||||||
result = await recFindByExt(newbase,ext,await fs.readdir(newbase),result)
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( file.substr(-1*(ext.length+1)) == '.' + ext )
|
|
||||||
{
|
|
||||||
result.push(newbase)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result
|
|
||||||
}
|
|
||||||
|
|
||||||
// outputs array of supported locales
|
|
||||||
async function createLocalizationJSON() {
|
|
||||||
xliffToJSON.convert('src/assets/i18n');
|
|
||||||
const files = await recFindByExt(path.join('src', 'assets', 'i18n'), 'json');
|
|
||||||
const locales = [];
|
|
||||||
|
|
||||||
for (let i = 0; i < files.length; i++) {
|
|
||||||
const file = path.basename(files[i]);
|
|
||||||
const file_parts = file.split('.');
|
|
||||||
locales.push(file_parts[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
fs.unlinkSync('src/assets/i18n/messages.en.json');
|
|
||||||
fs.writeJSONSync('src/assets/i18n/supported_locales.json', {supported_locales: locales});
|
|
||||||
}
|
|
||||||
|
|
||||||
createLocalizationJSON();
|
|
||||||
Reference in New Issue
Block a user