Fix the behavior when auto-start option is not explicitly passed

pull/355/head
Qiao Wang 2023-12-13 21:06:39 +08:00
parent f73b39fcab
commit ab189f8533
1 changed files with 2 additions and 0 deletions

View File

@ -120,6 +120,8 @@ async def add(request):
auto_start = post.get('auto_start') auto_start = post.get('auto_start')
if custom_name_prefix is None: if custom_name_prefix is None:
custom_name_prefix = '' custom_name_prefix = ''
if auto_start is None:
auto_start = True
status = await dqueue.add(url, quality, format, folder, custom_name_prefix, auto_start) status = await dqueue.add(url, quality, format, folder, custom_name_prefix, auto_start)
return web.Response(text=serializer.encode(status)) return web.Response(text=serializer.encode(status))