Skip to content

Commit 4d26d24

Browse files
fix(yt-dlp): add deno js runtime
1 parent 2b34b9a commit 4d26d24

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

.github/workflows/auto-update-db.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ jobs:
4848
python -m pip install --upgrade pip
4949
python -m pip install -r requirements.txt
5050
51+
- name: Install npm dependencies
52+
run: npm install
53+
5154
- name: Parse Issue
5255
uses: stefanbuck/github-issue-parser@v3
5356
id: issue-parser

.github/workflows/python-tests.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@ jobs:
2828
python -m pip install -r requirements-dev.txt
2929
3030
- name: Install npm dependencies
31-
run: |
32-
npm install
31+
run: npm install
3332

3433
- name: Test with pytest
3534
env:

.github/workflows/update-pages.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ jobs:
5555
python -m pip install -r requirements.txt
5656
5757
- name: Install npm dependencies
58-
run: |
59-
npm install
58+
run: npm install
6059

6160
- name: Update
6261
env:

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
2-
"dependencies": {
2+
"devDependencies": {
3+
"deno": "2.5.6",
34
"electron": "6.1.4",
45
"orca": "1.3.1"
56
}

src/updater.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,10 +500,18 @@ def check_youtube(data: dict) -> str:
500500
break
501501

502502
# url provided, now process it using youtube_dl
503-
youtube_dl_params = dict(
504-
outmpl='%(id)s.%(ext)s',
505-
youtube_include_dash_manifest=False,
506-
)
503+
youtube_dl_params = {
504+
"js_runtimes": {
505+
"deno": {
506+
"path": os.path.join("node_modules", "deno", "deno"),
507+
},
508+
},
509+
"outmpl": '%(id)s.%(ext)s',
510+
"remote_components": {
511+
"ejs": "npm",
512+
},
513+
"youtube_include_dash_manifest": False,
514+
}
507515

508516
ydl = youtube_dl.YoutubeDL(params=youtube_dl_params)
509517

0 commit comments

Comments
 (0)