Fixed ValueError when URL list in addToQueue request is too long

This commit is contained in:
uh_wot 2020-05-21 22:57:48 +02:00
parent 47c6fe50a2
commit c588fe20ef

View file

@ -18,6 +18,11 @@ import mimetypes
mimetypes.add_type('text/css', '.css') mimetypes.add_type('text/css', '.css')
mimetypes.add_type('text/javascript', '.js') mimetypes.add_type('text/javascript', '.js')
# Makes engineio accept more packets from client, needed for long URL lists in addToQueue requests
# https://github.com/miguelgrinberg/python-engineio/issues/142#issuecomment-545807047
from engineio.payload import Payload
Payload.max_decode_packets = 500
class CustomFlask(Flask): class CustomFlask(Flask):
jinja_options = Flask.jinja_options.copy() jinja_options = Flask.jinja_options.copy()
jinja_options.update(dict( jinja_options.update(dict(