Page MenuHomeSolus

D12200.id29621.diff
No OneTemporary

D12200.id29621.diff

diff --git a/files/0001-Replace-youtube-dl-with-yt-dlp.patch b/files/0001-Replace-youtube-dl-with-yt-dlp.patch
new file mode 100644
--- /dev/null
+++ b/files/0001-Replace-youtube-dl-with-yt-dlp.patch
@@ -0,0 +1,128 @@
+From adc049c399b47395d212354d4915e5dc1f793960 Mon Sep 17 00:00:00 2001
+From: Thomas Staudinger <Staudi.Kaos@gmail.com>
+Date: Fri, 5 Nov 2021 22:38:29 +0100
+Subject: [PATCH] Replace youtube-dl with yt-dlp
+
+---
+ player/lua/ytdl_hook.lua | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/player/lua/ytdl_hook.lua b/player/lua/ytdl_hook.lua
+index e9a7b3a..1be0eaf 100644
+--- a/player/lua/ytdl_hook.lua
++++ b/player/lua/ytdl_hook.lua
+@@ -8,7 +8,7 @@ local o = {
+ use_manifests = false,
+ all_formats = false,
+ force_all_formats = true,
+- ytdl_path = "youtube-dl",
++ ytdl_path = "yt-dlp",
+ }
+
+ local ytdl = {
+@@ -44,7 +44,7 @@ local safe_protos = Set {
+ "data"
+ }
+
+--- For some sites, youtube-dl returns the audio codec (?) only in the "ext" field.
++-- For some sites, yt-dlp returns the audio codec (?) only in the "ext" field.
+ local ext_map = {
+ ["mp3"] = "mp3",
+ ["opus"] = "opus",
+@@ -60,7 +60,7 @@ local codec_map = {
+ ["mp4a%..*"] = "aac",
+ }
+
+--- Codec name as reported by youtube-dl mapped to mpv internal codec names.
++-- Codec name as reported by yt-dlp mapped to mpv internal codec names.
+ -- Fun fact: mpv will not really use the codec, but will still try to initialize
+ -- the codec on track selection (just to scrap it), meaning it's only a hint,
+ -- but one that may make initialization fail. On the other hand, if the codec
+@@ -97,7 +97,7 @@ local function option_was_set_locally(name)
+ return mp.get_property_bool("option-info/" ..name.. "/set-locally", false)
+ end
+
+--- youtube-dl may set special http headers for some sites (user-agent, cookies)
++-- yt-dlp may set special http headers for some sites (user-agent, cookies)
+ local function set_http_headers(http_headers)
+ if not http_headers then
+ return
+@@ -341,9 +341,9 @@ local function as_integer(v, def)
+ return def
+ end
+
+--- Convert a format list from youtube-dl to an EDL URL, or plain URL.
+--- json: full json blob by youtube-dl
+--- formats: format list by youtube-dl
++-- Convert a format list from yt-dlp to an EDL URL, or plain URL.
++-- json: full json blob by yt-dlp
++-- formats: format list by yt-dlp
+ -- use_all_formats: if=true, then formats is the full format list, and the
+ -- function will attempt to return them as delay-loaded tracks
+ -- See res table initialization in the function for result type.
+@@ -535,7 +535,7 @@ local function add_single_video(json)
+ end
+
+ if (not res) and has_requested_formats then
+- format_info = "youtube-dl (separate)"
++ format_info = "yt-dlp (separate)"
+ res = formats_to_edl(json, requested_formats, false)
+ end
+
+@@ -545,7 +545,7 @@ local function add_single_video(json)
+ end
+
+ if streamurl == "" and json.url then
+- format_info = "youtube-dl (single)"
++ format_info = "yt-dlp (single)"
+ local edl_track = nil
+ edl_track = edl_track_joined(json.fragments, json.protocol,
+ json.is_live, json.fragment_base_url)
+@@ -682,22 +682,22 @@ local function check_version(ytdl_path)
+ end
+ local version_ts = os.time{year=year, month=month, day=day}
+ if (os.difftime(os.time(), version_ts) > 60*60*24*90) then
+- msg.warn("It appears that your youtube-dl version is severely out of date.")
++ msg.warn("It appears that your yt-dlp version is severely out of date.")
+ end
+ end
+
+ function run_ytdl_hook(url)
+ local start_time = os.clock()
+
+- -- check for youtube-dl in mpv's config dir
++ -- check for yt-dlp in mpv's config dir
+ if not (ytdl.searched) then
+ local exesuf = (package.config:sub(1,1) == '\\') and '.exe' or ''
+ local ytdl_mcd = mp.find_config_file(o.ytdl_path .. exesuf)
+ if ytdl_mcd == nil then
+- msg.verbose("No youtube-dl found with path "..o.ytdl_path..exesuf.." in config directories")
++ msg.verbose("No yt-dlp found with path "..o.ytdl_path..exesuf.." in config directories")
+ ytdl.path = o.ytdl_path
+ else
+- msg.verbose("found youtube-dl at: " .. ytdl_mcd)
++ msg.verbose("found yt-dlp at: " .. ytdl_mcd)
+ ytdl.path = ytdl_mcd
+ end
+ ytdl.searched = true
+@@ -768,7 +768,7 @@ function run_ytdl_hook(url)
+ -- trim our stderr to avoid spurious newlines
+ ytdl_err = result.stderr:gsub("^%s*(.-)%s*$", "%1")
+ msg.error(ytdl_err)
+- local err = "youtube-dl failed: "
++ local err = "yt-dlp failed: "
+ if result.error_string and result.error_string == "init" then
+ err = err .. "not found or not enough permissions"
+ elseif not result.killed_by_us then
+@@ -791,7 +791,7 @@ function run_ytdl_hook(url)
+ return
+ end
+
+- msg.verbose("youtube-dl succeeded!")
++ msg.verbose("yt-dlp succeeded!")
+ msg.debug('ytdl parsing took '..os.clock()-start_time..' seconds')
+
+ json["proxy"] = json["proxy"] or proxy
+--
+2.33.1
+
diff --git a/files/series b/files/series
--- a/files/series
+++ b/files/series
@@ -1,3 +1,4 @@
+0001-Replace-youtube-dl-with-yt-dlp.patch
0001-Support-a-stateless-configuration-on-nix-systems.patch
vo-gpu-placebo-update-for-upstream-API-changes.patch
vo_gpu-vaapi-export-plane-pitch-properly.patch
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,7 +1,7 @@
name : mpv
homepage : https://mpv.io/
version : 0.33.1
-release : 95
+release : 96
source :
- https://github.com/mpv-player/mpv/archive/refs/tags/v0.33.1.tar.gz : 100a116b9f23bdcda3a596e9f26be3a69f166a4f1d00910d1789b6571c46f3a9
- https://waf.io/waf-2.0.21 : 7cebf2c5efe53cbb9a4b5bdc4b49ae90ecd64a8fce7a3222d58e591b58215306
@@ -45,9 +45,9 @@
- python-docutils
- vulkan-headers
rundeps :
- - youtube-dl
+ - yt-dlp
- libs :
- - youtube-dl
+ - yt-dlp
patterns :
- libs :
- /usr/lib64/lib*.so.*
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -3,8 +3,8 @@
<Name>mpv</Name>
<Homepage>https://mpv.io/</Homepage>
<Packager>
- <Name>Joshua Strobl</Name>
- <Email>joshua@getsol.us</Email>
+ <Name>Thomas Staudinger</Name>
+ <Email>Staudi.Kaos@gmail.com</Email>
</Packager>
<License>GPL-2.0-or-later</License>
<License>LGPL-2.1-or-later</License>
@@ -61,7 +61,7 @@
</Description>
<PartOf>programming.devel</PartOf>
<RuntimeDependencies>
- <Dependency release="95">mpv-libs</Dependency>
+ <Dependency release="96">mpv-libs</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="header">/usr/include/mpv/client.h</Path>
@@ -77,12 +77,12 @@
</Replaces>
</Package>
<History>
- <Update release="95">
- <Date>2021-10-15</Date>
+ <Update release="96">
+ <Date>2021-11-05</Date>
<Version>0.33.1</Version>
<Comment>Packaging update</Comment>
- <Name>Joshua Strobl</Name>
- <Email>joshua@getsol.us</Email>
+ <Name>Thomas Staudinger</Name>
+ <Email>Staudi.Kaos@gmail.com</Email>
</Update>
</History>
</PISI>
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
Sat, Jul 22, 10:47 AM (2 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5857487
Default Alt Text
D12200.id29621.diff (7 KB)

Event Timeline