anime-downloader bug fix 4.

This commit is contained in:
2022-03-28 18:43:12 +09:00
parent c24f0bcde3
commit f4956471dc

View File

@@ -162,6 +162,7 @@ class LogicOhli24(LogicModuleBase):
self.queue.set_max_ffmpeg_count(P.ModelSetting.get_int('ohli24_max_ffmpeg_process_count')) self.queue.set_max_ffmpeg_count(P.ModelSetting.get_int('ohli24_max_ffmpeg_process_count'))
def get_series_info(self, code): def get_series_info(self, code):
code_type = 'c'
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
@@ -169,12 +170,16 @@ class LogicOhli24(LogicModuleBase):
if code.startswith('http'): if code.startswith('http'):
code = code.split('c/')[1] code = code.split('c/')[1]
# if code is None: if code is None:
# code = code.split('e/')[1] code_type = 'e'
code = code.split('e/')[1]
logger.info(f'code:::: {code}') logger.info(f'code:::: {code}')
url = P.ModelSetting.get('ohli24_url') + '/c/' + code if code_type == 'e':
url = P.ModelSetting.get('ohli24_url') + '/c/' + code
else:
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',