From 049347a8573d9972d27bf619cc48f4676442ef40 Mon Sep 17 00:00:00 2001 From: taskylizard <75871323+taskylizard@users.noreply.github.com> Date: Fri, 21 Jun 2024 21:41:28 +0000 Subject: [PATCH] fix: hls playback --- src/formatters.nim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/formatters.nim b/src/formatters.nim index ed17c80..c8bf774 100644 --- a/src/formatters.nim +++ b/src/formatters.nim @@ -91,6 +91,8 @@ proc proxifyVideo*(manifest: string; proxy: bool): string = for line in manifest.splitLines: let url = if line.startsWith("#EXT-X-MAP:URI"): line[16 .. ^2] + elif line.startsWith("#EXT-X-MEDIA") and "URI=" in line: + line[line.find("URI=") + 5 .. -1 + line.find("\"", start= 5 + line.find("URI="))] else: line if url.startsWith('/'): let path = "https://video.twimg.com" & url