Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
Switch to yt-dlp (fixes #432)
Browse files Browse the repository at this point in the history
youtube-dl has no new release since 2021
  • Loading branch information
Rudloff committed Mar 30, 2023
1 parent 9564764 commit 3e45f19
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 28 deletions.
10 changes: 8 additions & 2 deletions classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Config
*
* @var string
*/
public string $youtubedl = "vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py";
public string $youtubedl = "vendor/yt-dlp/yt-dlp/yt_dlp/__main__.py";

/**
* python binary path.
Expand All @@ -39,7 +39,13 @@ class Config
* @var string[]
*/
public array $params = [
'--no-warnings', '--ignore-errors', '--flat-playlist', '--restrict-filenames', '--no-playlist'
'--no-warnings',
'--ignore-errors',
'--flat-playlist',
'--restrict-filenames',
'--no-playlist',
'--use-extractors',
'default,-generic',
];

/**
Expand Down
14 changes: 5 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"symfony/translation": "^4.0",
"symfony/yaml": "^4.0",
"webfontkit/open-sans": "^1.0",
"ytdl-org/youtube-dl": "^2021.12",
"yt-dlp/yt-dlp": "^2023.03",
"zonuexe/http-accept-language": "^0.4.1"
},
"require-dev": {
Expand All @@ -62,11 +62,11 @@
{
"type": "package",
"package": {
"name": "ytdl-org/youtube-dl",
"version": "2021.12.17",
"name": "yt-dlp/yt-dlp",
"version": "2023.03.04",
"dist": {
"type": "tar",
"url": "https://yt-dl.org/downloads/2021.12.17/youtube-dl-2021.12.17.tar.gz"
"url": "https://github.com/yt-dlp/yt-dlp/releases/download/2023.03.04/yt-dlp.tar.gz"
}
}
}
Expand Down Expand Up @@ -108,11 +108,7 @@
"installer-types": [
"library"
],
"patches": {
"ytdl-org/youtube-dl": {
"Disable the generic extractor": "patches/youtube-dl-disable-generic.diff"
}
}
"patches": {}
},
"scripts": {
"lint": "grumphp run --ansi",
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion config/config.example.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Path to your youtube-dl binary
youtubedl: vendor/ytdl-org/youtube-dl/youtube_dl/__main__.py
youtubedl: vendor/yt-dlp/yt-dlp/yt_dlp/__main__.py

# Path to your python binary
python: /usr/bin/python
Expand All @@ -12,6 +12,8 @@ params:
- --flat-playlist
- --restrict-filenames
- --no-playlist
- --use-extractors
- default,-generic

# True to enable audio conversion
convert: false
Expand Down
12 changes: 0 additions & 12 deletions patches/youtube-dl-disable-generic.diff

This file was deleted.

0 comments on commit 3e45f19

Please sign in to comment.