Skip to content

Commit

Permalink
Bug fix on thumbnail names with ' apostrophe
Browse files Browse the repository at this point in the history
  • Loading branch information
dormant-user committed Dec 7, 2023
1 parent 4b94cd2 commit 10d5b2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pystream/routers/video.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 10d5b2d

Please sign in to comment.