mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
override waitress file_wrapper
This commit is contained in:
@@ -11,6 +11,8 @@ from typing import Literal
|
||||
from flask import send_file, request, Response, send_from_directory
|
||||
from flask_openapi3 import APIBlueprint, Tag
|
||||
from pydantic import BaseModel, Field
|
||||
import werkzeug
|
||||
import werkzeug.wsgi
|
||||
from app.api.apischemas import TrackHashSchema
|
||||
from app.lib.trackslib import get_silence_paddings
|
||||
from app.lib.transcoder import start_transcoding
|
||||
@@ -59,6 +61,7 @@ def send_track_file_legacy(path: TrackHashSchema, query: SendTrackFileQuery):
|
||||
|
||||
NOTE: Does not support range requests or transcoding.
|
||||
"""
|
||||
request.environ["wsgi.file_wrapper"] = werkzeug.wsgi.FileWrapper
|
||||
trackhash = path.trackhash
|
||||
filepath = query.filepath
|
||||
msg = {"msg": "File Not Found"}
|
||||
|
||||
Reference in New Issue
Block a user