Skip to content

Commit dfe89b3

Browse files
committed
Add EJS support.
1 parent 8d0e3c3 commit dfe89b3

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ COPY --from=build /app .
1111
COPY ./Scripts/install-dotnet8.sh .
1212
RUN bash install-dotnet8.sh
1313
RUN python3 -m pip install --force-reinstall --break-system-packages git+https://github.com/yt-dlp/yt-dlp.git@release
14+
ADD https://deno.land/install.sh install-deno.sh
15+
RUN apt-get update && apt-get install --no-install-recommends -y unzip
16+
RUN bash install-deno.sh -y
1417
ENTRYPOINT [ "dotnet", "TelegramVideoBot.dll" ]

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Telegram bot that facilitates downloading videos from various websites and servi
66

77
Uses YT-DLP and FFMpeg under the hood. Supports hardware acceleration, but it will fall back to software transcoding.
88

9+
A dependency has been added on [Deno](https://deno.com/) (or similar EJS) as per the [YT-DLP documentation](https://github.com/yt-dlp/yt-dlp/wiki/EJS). The Telegram Video Bot Docker image handles this dependency automatically.
10+
911
## Usage
1012

1113
### Environment Variables

Workers/DownloadManager.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ private async Task StartDownloads()
5252

5353
var downloadProcInfo = new ProcessStartInfo("yt-dlp")
5454
{
55-
Arguments = $"-f \"bv*+ba/b\" -S \"filesize~50M\" -o {userId}.%(ext)s {download.VideoUrl}",
55+
// adding remote-components here as per https://github.com/yt-dlp/yt-dlp/wiki/EJS
56+
// NOTE that this adds a dependency on deno or similar EJS runtime
57+
Arguments = $"-f \"bv*+ba/b\" -S \"filesize~50M\" --remote-components ejs:github -o {userId}.%(ext)s {download.VideoUrl}",
5658
RedirectStandardError = true,
5759
RedirectStandardOutput = true
5860
};

0 commit comments

Comments
 (0)