Commit 2e2125a

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-01-12 03:49:06
feat(ytdlp): use `aria2` as external downloader for bilibili
1 parent ee091da
Changed files (2)
docker
src
ytdlp
docker/base.Dockerfile
@@ -22,7 +22,7 @@ COPY --link --from=s6 / /
 COPY --from=venv /.venv /venv
 
 RUN apt-get update && \
-    apt-get install -y --no-install-recommends libmagic1 cron && \
+    apt-get install -y --no-install-recommends libmagic1 cron aria2 && \
     groupadd --gid 1000 abc && \
     useradd -u 1000 -g 1000 --create-home -d /app -s /bin/false abc && \
     apt-get clean && \
src/ytdlp/utils.py
@@ -83,6 +83,7 @@ async def get_ytdlp_opts(platform: Literal["youtube", "bilibili", "ytdlp"] | Non
         cookiefile = await ytdlp_bilibili_cookie()
         logger.trace(f"Use cookie file: {cookiefile}")
         ytdlp_opts["cookiefile"] = cookiefile
+        ytdlp_opts["external_downloader"] = {"default": "aria2c"}
     return ytdlp_opts