anilife update 2022.10.23(01.)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import threading
|
||||
import traceback
|
||||
import json
|
||||
from datetime import datetime
|
||||
@@ -812,6 +813,28 @@ class LogicAniLife(LogicModuleBase):
|
||||
req.form["command"], int(req.form["entity_id"])
|
||||
)
|
||||
return jsonify(ret)
|
||||
elif sub == "add_queue_checked_list":
|
||||
data = json.loads(request.form["data"])
|
||||
|
||||
def func():
|
||||
count = 0
|
||||
for tmp in data:
|
||||
add_ret = self.add(tmp)
|
||||
if add_ret.startswith("enqueue"):
|
||||
self.socketio_callback("list_refresh", "")
|
||||
count += 1
|
||||
notify = {
|
||||
"type": "success",
|
||||
"msg": "%s 개의 에피소드를 큐에 추가 하였습니다." % count,
|
||||
}
|
||||
socketio.emit(
|
||||
"notify", notify, namespace="/framework", broadcast=True
|
||||
)
|
||||
|
||||
thread = threading.Thread(target=func, args=())
|
||||
thread.daemon = True
|
||||
thread.start()
|
||||
return jsonify("")
|
||||
|
||||
except Exception as e:
|
||||
P.logger.error("Exception:%s", e)
|
||||
@@ -1032,7 +1055,7 @@ class LogicAniLife(LogicModuleBase):
|
||||
entity["link"] = P.ModelSetting.get("anilife_url") + entity["link"]
|
||||
# real_url = LogicAniLife.get_real_link(url=entity["link"])
|
||||
|
||||
logger.debug(entity["link"])
|
||||
# logger.debug(entity["link"])
|
||||
|
||||
entity["code"] = entity["link"].split("/")[-1]
|
||||
entity["title"] = item.xpath(".//div[@class='tt']/text()")[0].strip()
|
||||
|
||||
Reference in New Issue
Block a user