Fix audio url in video m3u8

This commit is contained in:
jackyzy823 2024-01-11 15:26:19 +08:00
parent 583c858cdf
commit 822ddfbefa
1 changed files with 2 additions and 0 deletions

View File

@ -82,6 +82,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 .. ^2]
else: line
if url.startsWith('/'):
let path = "https://video.twimg.com" & url