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