anime-downloader bug fix 5.

This commit is contained in:
2022-03-28 18:52:51 +09:00
parent f4956471dc
commit c57c94b448

View File

@@ -136,6 +136,7 @@ class LogicOhli24(LogicModuleBase):
return jsonify(ret)
elif sub == 'add_queue_checked_list':
data = json.loads(request.form['data'])
def func():
count = 0
for tmp in data:
@@ -145,6 +146,7 @@ class LogicOhli24(LogicModuleBase):
count += 1
notify = {'type': 'success', 'msg': u'%s 개의 에피소드를 큐에 추가 하였습니다.' % count}
socketio.emit("notify", notify, namespace='/framework', broadcast=True)
thread = threading.Thread(target=func, args=())
thread.daemon = True
thread.start()
@@ -163,23 +165,26 @@ class LogicOhli24(LogicModuleBase):
def get_series_info(self, code):
code_type = 'c'
# _code = None
try:
if self.current_data is not None and 'code' in self.current_data and self.current_data['code'] == code:
return self.current_data
if code.startswith('http'):
if code.split('c/')[1] is not None:
code = code.split('c/')[1]
if code is None:
code_type = 'c'
elif code.split('e/')[1] is not None:
code_type = 'e'
code = code.split('e/')[1]
logger.info(f'code:::: {code}')
if code_type == 'e':
url = P.ModelSetting.get('ohli24_url') + '/c/' + code
url = P.ModelSetting.get('ohli24_url') + '/c/' + _code
else:
url = P.ModelSetting.get('ohli24_url') + '/e/' + code
url = P.ModelSetting.get('ohli24_url') + '/e/' + _code
logger.debug('url:::> %s', url)
# self.current_headers = { 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
# AppleWebKit/537.36 (KHTML, like Gecko) ' 'Chrome/96.0.4664.110 Whale/3.12.129.46 Safari/537.36',