From 10d5b2d792cd8b4fdc75d5886ad273944e3dc313 Mon Sep 17 00:00:00 2001 From: thevickypedia Date: Wed, 6 Dec 2023 18:13:48 -0600 Subject: [PATCH] Bug fix on thumbnail names with `'` apostrophe --- pystream/routers/video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pystream/routers/video.py b/pystream/routers/video.py index ab956a1..645abb5 100644 --- a/pystream/routers/video.py +++ b/pystream/routers/video.py @@ -82,7 +82,7 @@ async def stream_video(request: Request, pys_preview = os.path.join(pure_path.parent, f"_{pure_path.name.replace('.mp4', '_pys_preview.jpg')}") if os.path.isfile(pys_preview) or Images(filepath=pure_path).generate_preview(pys_preview): preview_src = pys_preview - attrs['preview'] = f"/{config.static.preview}/{preview_src}" + attrs['preview'] = urlparse.quote(f"/{config.static.preview}/{preview_src}") return auth.templates.TemplateResponse(name=config.fileio.index, headers=None, context=attrs) else: raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail=f"Video file {video_path!r} not found")