Spaces:
Runtime error
Runtime error
imperialwool
commited on
Commit
·
86d1f26
1
Parent(s):
a39dd78
fix: audioformat -> extension
Browse files- Dockerfile +4 -2
- routes/ytApi/getFull.py +2 -2
- routes/ytApi/getPreview.py +1 -1
Dockerfile
CHANGED
|
@@ -10,12 +10,14 @@ RUN chmod -R 777 /app
|
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
-
RUN apt update
|
| 14 |
|
| 15 |
-
RUN
|
| 16 |
|
| 17 |
RUN python3 -m pip install -U --no-cache-dir pip setuptools wheel
|
| 18 |
|
|
|
|
|
|
|
| 19 |
RUN python3 -m pip install --force-reinstall --no-cache-dir https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
|
| 20 |
|
| 21 |
RUN mkdir -p /.cache/huggingface/hub
|
|
|
|
| 10 |
|
| 11 |
WORKDIR /app
|
| 12 |
|
| 13 |
+
RUN apt-get update
|
| 14 |
|
| 15 |
+
RUN apt-get install ffmpeg -y
|
| 16 |
|
| 17 |
RUN python3 -m pip install -U --no-cache-dir pip setuptools wheel
|
| 18 |
|
| 19 |
+
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 20 |
+
|
| 21 |
RUN python3 -m pip install --force-reinstall --no-cache-dir https://github.com/yt-dlp/yt-dlp/archive/master.tar.gz
|
| 22 |
|
| 23 |
RUN mkdir -p /.cache/huggingface/hub
|
routes/ytApi/getFull.py
CHANGED
|
@@ -4,7 +4,7 @@ from .. import helpers
|
|
| 4 |
|
| 5 |
def getFull(request):
|
| 6 |
error_code = None
|
| 7 |
-
|
| 8 |
url = helpers.getFromRequest(request, "url")
|
| 9 |
if not url: return {"status": "error", "details": { "error_code": 101, "error_details": "No link provided" }}, 400
|
| 10 |
|
|
@@ -16,7 +16,7 @@ def getFull(request):
|
|
| 16 |
quality = 'worst'
|
| 17 |
else: quality = quality.lower()
|
| 18 |
|
| 19 |
-
audioformat = helpers.getFromRequest(request, "
|
| 20 |
if not audioformat or audioformat.lower() not in ['m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm']:
|
| 21 |
audioformat = 'ogg'
|
| 22 |
else: audioformat = audioformat.lower()
|
|
|
|
| 4 |
|
| 5 |
def getFull(request):
|
| 6 |
error_code = None
|
| 7 |
+
|
| 8 |
url = helpers.getFromRequest(request, "url")
|
| 9 |
if not url: return {"status": "error", "details": { "error_code": 101, "error_details": "No link provided" }}, 400
|
| 10 |
|
|
|
|
| 16 |
quality = 'worst'
|
| 17 |
else: quality = quality.lower()
|
| 18 |
|
| 19 |
+
audioformat = helpers.getFromRequest(request, "extension")
|
| 20 |
if not audioformat or audioformat.lower() not in ['m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm']:
|
| 21 |
audioformat = 'ogg'
|
| 22 |
else: audioformat = audioformat.lower()
|
routes/ytApi/getPreview.py
CHANGED
|
@@ -17,7 +17,7 @@ def getPreview(request):
|
|
| 17 |
quality = 'worst'
|
| 18 |
else: quality = quality.lower()
|
| 19 |
|
| 20 |
-
audioformat = helpers.getFromRequest(request, "
|
| 21 |
if not audioformat or audioformat.lower() not in ['m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm']:
|
| 22 |
audioformat = 'ogg'
|
| 23 |
else: audioformat = audioformat.lower()
|
|
|
|
| 17 |
quality = 'worst'
|
| 18 |
else: quality = quality.lower()
|
| 19 |
|
| 20 |
+
audioformat = helpers.getFromRequest(request, "extension")
|
| 21 |
if not audioformat or audioformat.lower() not in ['m4a', 'aac', 'mp3', 'ogg', 'opus', 'webm']:
|
| 22 |
audioformat = 'ogg'
|
| 23 |
else: audioformat = audioformat.lower()
|