auto download fix5
This commit is contained in:
@@ -508,6 +508,8 @@ class LogicLinkkf(object):
|
|||||||
ret["data"] = whitelist_programs
|
ret["data"] = whitelist_programs
|
||||||
ret["whitelist_program"] = ",".join(whitelist_programs)
|
ret["whitelist_program"] = ",".join(whitelist_programs)
|
||||||
ret["data"] = whitelist_programs
|
ret["data"] = whitelist_programs
|
||||||
|
ret["whitelist_program"] = ",".join(whitelist_programs)
|
||||||
|
ret["data"] = whitelist_programs
|
||||||
ret["log"] = "No current data!!"
|
ret["log"] = "No current data!!"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error("Exception:%s", e)
|
logger.error("Exception:%s", e)
|
||||||
|
|||||||
+3
-2
@@ -186,9 +186,10 @@ class ModuleBasic(PluginModuleBase):
|
|||||||
if sub == "apply_new_season":
|
if sub == "apply_new_season":
|
||||||
return jsonify(LogicLinkkf.apply_new_season(req.form["new_season"]))
|
return jsonify(LogicLinkkf.apply_new_season(req.form["new_season"]))
|
||||||
if sub == "add_whitelist":
|
if sub == "add_whitelist":
|
||||||
payload = req.get_json()
|
payload = req.get_json(silent=True)
|
||||||
if payload is None:
|
if payload is None:
|
||||||
ret = LogicLinkkf.add_whitelist()
|
form_code = req.form.get("code", "").strip()
|
||||||
|
ret = LogicLinkkf.add_whitelist(form_code) if form_code != "" else LogicLinkkf.add_whitelist()
|
||||||
else:
|
else:
|
||||||
ret = LogicLinkkf.add_whitelist(payload)
|
ret = LogicLinkkf.add_whitelist(payload)
|
||||||
return jsonify(ret)
|
return jsonify(ret)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
const extraAttrs = (attrs || [])
|
const extraAttrs = (attrs || [])
|
||||||
.map((item) => ` data-${item.key}="${escapeHtml(item.value)}"`)
|
.map((item) => ` data-${item.key}="${escapeHtml(item.value)}"`)
|
||||||
.join("");
|
.join("");
|
||||||
return `<button id="${escapeHtml(id)}" class="btn btn-sm ${extraClass} mr-1 mb-1"${extraAttrs}>${escapeHtml(text)}</button>`;
|
return `<button type="button" id="${escapeHtml(id)}" class="btn btn-sm ${extraClass} mr-1 mb-1"${extraAttrs}>${escapeHtml(text)}</button>`;
|
||||||
};
|
};
|
||||||
|
|
||||||
const mButtonGroup = (inner) =>
|
const mButtonGroup = (inner) =>
|
||||||
@@ -289,11 +289,11 @@
|
|||||||
url: `/${package_name}/ajax/add_whitelist`,
|
url: `/${package_name}/ajax/add_whitelist`,
|
||||||
type: "POST",
|
type: "POST",
|
||||||
cache: false,
|
cache: false,
|
||||||
|
data: { code: currentData?.code || code || "" },
|
||||||
dataType: "json",
|
dataType: "json",
|
||||||
success: function (ret) {
|
success: function (ret) {
|
||||||
if (ret.ret) {
|
if (ret.ret) {
|
||||||
notifySuccess("추가되었습니다.");
|
notifySuccess("추가되었습니다.");
|
||||||
renderProgram(ret);
|
|
||||||
} else {
|
} else {
|
||||||
notifyWarning(ret.log || "추가에 실패했습니다.");
|
notifyWarning(ret.log || "추가에 실패했습니다.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user