Compare commits

...

5 Commits

Author SHA1 Message Date
9fe7304500 anime-downloader bug fix 7. 2022-03-28 19:27:26 +09:00
9745d81c6a anime-downloader bug fix 7. 2022-03-28 19:25:27 +09:00
e29d91e36d anime-downloader bug fix 6. 2022-03-28 19:20:26 +09:00
27a08d9384 anime-downloader bug fix 5. 2022-03-28 19:14:25 +09:00
c57c94b448 anime-downloader bug fix 5. 2022-03-28 18:52:51 +09:00
2 changed files with 25 additions and 10 deletions

View File

@@ -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'):
# 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]
if '/c/' in code:
code = code.split('c/')[1] code = code.split('c/')[1]
if code is None: code_type = 'c'
code_type = 'e' 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',

View File

@@ -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();