split plugin install, runtime whitelisting
This commit is contained in:
parent
ee4b91f2e1
commit
8f45e3cb7e
|
|
@ -25,7 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
|
||||
# install requirements
|
||||
COPY ./backend/requirements.txt /requirements.txt
|
||||
RUN pip install --user -r requirements.txt
|
||||
COPY ./backend/requirements.plugins.txt /requirements.plugins.txt
|
||||
RUN pip install --user -r /requirements.txt \
|
||||
&& python -m pip install --target /opt/yt_plugins/bgutil -r /requirements.plugins.txt
|
||||
|
||||
# build ffmpeg
|
||||
FROM python:3.13.11-slim-trixie AS ffmpeg-builder
|
||||
|
|
@ -46,6 +48,7 @@ COPY --from=denoland/deno:bin /deno /usr/local/bin/deno
|
|||
|
||||
# copy build requirements
|
||||
COPY --from=builder /root/.local /root/.local
|
||||
COPY --from=builder /opt/yt_plugins /opt/yt_plugins
|
||||
ENV PATH=/root/.local/bin:$PATH
|
||||
|
||||
# copy ffmpeg
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ class YtWrap:
|
|||
"cachedir": path.abspath(
|
||||
path.join(EnvironmentSettings.CACHE_DIR, "ytdlp")
|
||||
),
|
||||
"plugin_dirs": [],
|
||||
}
|
||||
|
||||
def __init__(self, obs_request, config=False):
|
||||
|
|
@ -72,17 +73,7 @@ class YtWrap:
|
|||
}
|
||||
},
|
||||
)
|
||||
return
|
||||
|
||||
# https://github.com/Brainicism/bgutil-ytdlp-pot-provider/pull/185
|
||||
deep_merge(
|
||||
self.obs,
|
||||
{
|
||||
"extractor_args": {
|
||||
"youtubepot-bgutilhttp": {"disable": ["True"]}
|
||||
}
|
||||
},
|
||||
)
|
||||
self.obs["plugin_dirs"].append("/opt/yt_plugins/bgutil")
|
||||
|
||||
def download(self, url):
|
||||
"""make download request"""
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
# install plugins in separate folder for runtime whitelisting
|
||||
bgutil-ytdlp-pot-provider==1.3.1
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
apprise==1.9.7
|
||||
bgutil-ytdlp-pot-provider @ git+https://github.com/bbilly1/bgutil-ytdlp-pot-provider@f9e694f0b040ec3074301e8ffccad0f9cdb68ed1#subdirectory=plugin
|
||||
apprise==1.9.8
|
||||
celery==5.6.2
|
||||
deepdiff==8.6.1
|
||||
django-auth-ldap==5.3.0
|
||||
|
|
@ -9,8 +8,8 @@ Django==6.0.3
|
|||
djangorestframework==3.16.1
|
||||
drf-spectacular==0.28.0 # rc:ignore
|
||||
Pillow==12.1.1
|
||||
redis==7.2.1
|
||||
redis==7.3.0
|
||||
requests==2.32.5
|
||||
ryd-client==0.0.6
|
||||
uvicorn==0.41.0
|
||||
yt-dlp[default]==2026.3.3
|
||||
yt-dlp[default]==2026.3.13
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
-r backend/requirements.txt
|
||||
ipython==9.10.0
|
||||
-r backend/requirements.plugins.txt
|
||||
ipython==9.11.0
|
||||
pre-commit==4.5.1
|
||||
pylint-django==2.7.0
|
||||
pylint==4.0.5
|
||||
|
|
|
|||
Loading…
Reference in New Issue