From 4242af85613d46e9c7d453f00441eb63b9ff3159 Mon Sep 17 00:00:00 2001 From: miyouzi Date: Sun, 2 Oct 2022 01:03:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8E=A7=E5=88=B6=E5=8F=B0?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E5=8A=A0=E8=BD=BD=20=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=8F=B0=E6=89=8B=E5=8A=A8=E4=BB=BB=E5=8A=A1=E6=9C=AA=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E7=BA=BF=E7=A8=8B=E8=87=AA=E5=8A=A8=E7=BD=AE=E4=B8=BA?= =?UTF-8?q?1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dashboard/Server.py | 5 ++++- Dashboard/static/js/aniGamerPlus.js | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Dashboard/Server.py b/Dashboard/Server.py index 6672557..08ab2cc 100644 --- a/Dashboard/Server.py +++ b/Dashboard/Server.py @@ -138,7 +138,10 @@ def manual_task(): mode = data['mode'] # 下载线程数 - thread = int(data['thread']) + if data['thread']: + thread = int(data['thread']) + else: + thread = 1 if thread > Config.get_max_multi_thread(): # 是否超过最大允许线程数 thread_limit = Config.get_max_multi_thread() diff --git a/Dashboard/static/js/aniGamerPlus.js b/Dashboard/static/js/aniGamerPlus.js index a2d874b..6b8919a 100644 --- a/Dashboard/static/js/aniGamerPlus.js +++ b/Dashboard/static/js/aniGamerPlus.js @@ -14,7 +14,9 @@ $.ajax({ success: function(data) { dataArrays = data; parseProxy(data.proxy); - renderJson(); + $(function (){ + renderJson(); + }); } }); @@ -180,7 +182,7 @@ function readManualConfig(){ var thread = $('#manual_thread_limit').val(); manualData['thread'] = thread; - + var danmu = $('#manual_danmu').is(":checked"); manualData['danmu'] = danmu;