anime-downloader bug fix 5.
This commit is contained in:
@@ -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:
|
||||
@@ -143,8 +144,9 @@ class LogicOhli24(LogicModuleBase):
|
||||
if add_ret.startswith('enqueue'):
|
||||
self.socketio_callback('list_refresh', '')
|
||||
count += 1
|
||||
notify = {'type':'success', 'msg' : u'%s 개의 에피소드를 큐에 추가 하였습니다.' % count}
|
||||
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'):
|
||||
|
||||
code = code.split('c/')[1]
|
||||
if code is None:
|
||||
if code.split('c/')[1] is not None:
|
||||
code = code.split('c/')[1]
|
||||
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',
|
||||
@@ -491,10 +496,10 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
||||
# logger.debug('stream_url:: %s', stream_url)
|
||||
logger.debug('stream_info:: %s', stream_info)
|
||||
self.headers = {
|
||||
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36",
|
||||
'Referer': 'https://ndoodle.xyz/video/03a3655fff3e9bdea48de9f49e938e32',
|
||||
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
||||
"Chrome/71.0.3554.0 Safari/537.36Mozilla/5.0 (Windows NT 10.0; Win64; x64) "
|
||||
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36",
|
||||
'Referer': 'https://ndoodle.xyz/video/03a3655fff3e9bdea48de9f49e938e32',
|
||||
}
|
||||
|
||||
self.url = stream_info[1].strip()
|
||||
|
||||
Reference in New Issue
Block a user