Compare commits
5 Commits
f4956471dc
...
9fe7304500
| Author | SHA1 | Date | |
|---|---|---|---|
| 9fe7304500 | |||
| 9745d81c6a | |||
| e29d91e36d | |||
| 27a08d9384 | |||
| c57c94b448 |
@@ -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:
|
||||||
@@ -143,8 +144,9 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
if add_ret.startswith('enqueue'):
|
if add_ret.startswith('enqueue'):
|
||||||
self.socketio_callback('list_refresh', '')
|
self.socketio_callback('list_refresh', '')
|
||||||
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,21 +165,32 @@ 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'):
|
||||||
|
|
||||||
code = code.split('c/')[1]
|
# if code.split('c/')[1] is not None:
|
||||||
if code is None:
|
# code = code.split('c/')[1]
|
||||||
code_type = 'e'
|
# code_type = 'c'
|
||||||
|
# elif code.split('e/')[1] is not None:
|
||||||
|
# code_type = 'e'
|
||||||
|
# code = code.split('e/')[1]
|
||||||
|
if '/c/' in code:
|
||||||
|
code = code.split('c/')[1]
|
||||||
|
code_type = 'c'
|
||||||
|
elif '/e/' in code:
|
||||||
code = code.split('e/')[1]
|
code = code.split('e/')[1]
|
||||||
|
code_type = 'e'
|
||||||
|
|
||||||
logger.info(f'code:::: {code}')
|
logger.info(f'code:::: {code}')
|
||||||
|
|
||||||
if code_type == 'e':
|
if code_type == 'c':
|
||||||
url = P.ModelSetting.get('ohli24_url') + '/c/' + code
|
url = P.ModelSetting.get('ohli24_url') + '/c/' + code
|
||||||
|
elif code_type == 'e':
|
||||||
|
url = P.ModelSetting.get('ohli24_url') + '/e/' + 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)
|
||||||
@@ -193,7 +206,7 @@ class LogicOhli24(LogicModuleBase):
|
|||||||
image = image.replace('..', P.ModelSetting.get('ohli24_url'))
|
image = image.replace('..', P.ModelSetting.get('ohli24_url'))
|
||||||
des_items = tree.xpath('//div[@class="list"]/p')
|
des_items = tree.xpath('//div[@class="list"]/p')
|
||||||
des = {}
|
des = {}
|
||||||
des_key = ['_otit', '_dir', '_pub', '_tag', '_classifi', '_country', '_grade']
|
des_key = ['_otit', '_dir', '_pub', '_tag', '_classifi', '_country', '_grade', '_total_chapter', '_show_time']
|
||||||
description_dict = {
|
description_dict = {
|
||||||
'원제': '_otit',
|
'원제': '_otit',
|
||||||
'원작': '_org',
|
'원작': '_org',
|
||||||
@@ -491,10 +504,10 @@ class Ohli24QueueEntity(FfmpegQueueEntity):
|
|||||||
# logger.debug('stream_url:: %s', stream_url)
|
# logger.debug('stream_url:: %s', stream_url)
|
||||||
logger.debug('stream_info:: %s', stream_info)
|
logger.debug('stream_info:: %s', stream_info)
|
||||||
self.headers = {
|
self.headers = {
|
||||||
'user-agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) "
|
'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) "
|
"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",
|
"AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3554.0 Safari/537.36",
|
||||||
'Referer': 'https://ndoodle.xyz/video/03a3655fff3e9bdea48de9f49e938e32',
|
'Referer': 'https://ndoodle.xyz/video/03a3655fff3e9bdea48de9f49e938e32',
|
||||||
}
|
}
|
||||||
|
|
||||||
self.url = stream_info[1].strip()
|
self.url = stream_info[1].strip()
|
||||||
|
|||||||
@@ -79,6 +79,8 @@
|
|||||||
tmp += m_row_start(2) + m_col(3, '분류', 'right') + m_col(9, data.des._classifi) + m_row_end();
|
tmp += m_row_start(2) + m_col(3, '분류', 'right') + m_col(9, data.des._classifi) + m_row_end();
|
||||||
tmp += m_row_start(2) + m_col(3, '방영일', 'right') + m_col(9, data.date+'('+data.day+')') + m_row_end();
|
tmp += m_row_start(2) + m_col(3, '방영일', 'right') + m_col(9, data.date+'('+data.day+')') + m_row_end();
|
||||||
tmp += m_row_start(2) + m_col(3, '등급', 'right') + m_col(9, data.des._grade) + m_row_end();
|
tmp += m_row_start(2) + m_col(3, '등급', 'right') + m_col(9, data.des._grade) + m_row_end();
|
||||||
|
tmp += m_row_start(2) + m_col(3, '총화수', 'right') + m_col(9, data._total_chapter) + m_row_end();
|
||||||
|
tmp += m_row_start(2) + m_col(3, '상영시간', 'right') + m_col(9, data._show_time) + m_row_end();
|
||||||
tmp += m_row_start(2) + m_col(3, '줄거리', 'right') + m_col(9, data.ser_description) + m_row_end();
|
tmp += m_row_start(2) + m_col(3, '줄거리', 'right') + m_col(9, data.ser_description) + m_row_end();
|
||||||
str += m_col(9, tmp)
|
str += m_col(9, tmp)
|
||||||
str += m_row_end();
|
str += m_row_end();
|
||||||
|
|||||||
Reference in New Issue
Block a user