Skip to content

Commit

Permalink
mpv: patch youtube-dl hook to fix playback from youtube
Browse files Browse the repository at this point in the history
  • Loading branch information
akierig authored and i0ntempest committed Mar 22, 2023
1 parent 9d495c5 commit b6cb56f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
5 changes: 4 additions & 1 deletion multimedia/mpv/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PortGroup legacysupport 1.1

# Please revbump mpv whenever ffmpeg{,-devel} is updated!
github.setup mpv-player mpv 0.35.1 v
revision 1
revision 2
categories multimedia
license GPL-2+
maintainers {ionic @Ionic} {i0ntempest @i0ntempest} openmaintainer
Expand Down Expand Up @@ -249,6 +249,9 @@ platform darwin {
}
}

# Fix youtube-dl hook for streaming youtube videos
patchfiles patch-youtubedl-edl-track-error.diff

# coreaudio does not build on < 10.6 so use pulseaudio instead (tested and works).
if {${os.major} < 10} {
configure.args-delete --enable-coreaudio
Expand Down
11 changes: 11 additions & 0 deletions multimedia/mpv/files/patch-youtubedl-edl-track-error.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- player/lua/ytdl_hook.lua.orig 2023-03-21 11:35:15 -0500
+++ player/lua/ytdl_hook.lua 2023-03-21 11:31:18 -0500
@@ -451,7 +451,7 @@
end
end

- local url = edl_track or track.url
+ local url = track.url
local hdr = {"!new_stream", "!no_clip", "!no_chapters"}
local skip = #tracks == 0
local params = ""

4 comments on commit b6cb56f

@barracuda156
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@akierig This has broken the build, since you cancelled applying all patches listed prior to this one.
-append must be used, unless it is the first patch to come in the portfile.

@pmetzger
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably should just submit a patch to fix it, @barracuda156

@barracuda156
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pmetzger Well, in a sense: I have fixed it in mpv-legacy, and in mpv patches for pre-Catalina OSs are irrelevant and therefore just dropped.

@akierig
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May I suggest just submitting a patch instead of commenting on a commit from 9+ months ago...

Please sign in to comment.