diff --git a/pikaraoke/app.py b/pikaraoke/app.py index ab8d14d5..01e318bf 100644 --- a/pikaraoke/app.py +++ b/pikaraoke/app.py @@ -801,11 +801,9 @@ def clear_preferences(): # Streams the file in chunks from the filesystem (chrome supports it, safari does not) - - @app.route("/stream/") def stream(id): - file_path = f"{get_tmp_dir()}/{id}.mp4" + file_path = os.path.join(get_tmp_dir(), f"{id}.mp4") def generate(): position = 0 # Initialize the position variable @@ -830,7 +828,7 @@ def generate(): # (Safari compatible, but requires the ffmpeg transcoding to be complete to know file size) @app.route("/stream/full/") def stream_full(id): - file_path = f"{get_tmp_dir()}/{id}.mp4" + file_path = os.path.join(get_tmp_dir(), f"{id}.mp4") try: file_size = os.path.getsize(file_path) range_header = request.headers.get("Range", None)