1
0
mirror of https://github.com/zedeus/nitter synced 2024-11-25 11:09:32 +01:00

Fix video processing crash

Closes #512
This commit is contained in:
Zed 2022-01-12 19:19:14 +01:00
parent 6c6386913e
commit 8a6fbe81ab

View File

@ -87,7 +87,7 @@ proc proxifyVideo*(manifest: string; proxy: bool): string =
let url = let url =
if line.startsWith("#EXT-X-MAP:URI"): line[16 .. ^2] if line.startsWith("#EXT-X-MAP:URI"): line[16 .. ^2]
else: line else: line
if url[0] == '/': if url.startsWith('/'):
let path = "https://video.twimg.com" & url let path = "https://video.twimg.com" & url
replacements.add (url, if proxy: path.getVidUrl else: path) replacements.add (url, if proxy: path.getVidUrl else: path)
return manifest.multiReplace(replacements) return manifest.multiReplace(replacements)