v1.0.1 로그 좀 더 상세히 찍도록 수정

This commit is contained in:
joyfuI
2020-02-10 01:06:11 +09:00
parent 47b3f615eb
commit 847ab7fb7d
4 changed files with 30 additions and 25 deletions

View File

@@ -15,7 +15,6 @@ v1.0.0
* 목록에서 진행률 표시 추가 * 목록에서 진행률 표시 추가
v0.1.1 v0.1.1
* ~~윈도우 환경 지원 추가~~
* 다운로드 실패 시 임시파일 삭제가 안 되는 문제 수정 * 다운로드 실패 시 임시파일 삭제가 안 되는 문제 수정
v0.1.0 v0.1.0

View File

@@ -1 +1 @@
{"more": "", "version": "1.0.0", "name": "youtube-dl", "developer": "joyfuI", "home": "https://github.com/joyfuI/youtube-dl", "description": "\uc720\ud29c\ube0c, \ub124\uc774\ubc84TV \ub4f1 \ub3d9\uc601\uc0c1 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ub3d9\uc601\uc0c1 \ub2e4\uc6b4\ub85c\ub4dc", "icon": "", "category_name": "vod"} {"more": "", "version": "1.0.1", "name": "youtube-dl", "developer": "joyfuI", "home": "https://github.com/joyfuI/youtube-dl", "description": "\uc720\ud29c\ube0c, \ub124\uc774\ubc84TV \ub4f1 \ub3d9\uc601\uc0c1 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ub3d9\uc601\uc0c1 \ub2e4\uc6b4\ub85c\ub4dc", "icon": "", "category_name": "vod"}

View File

@@ -78,6 +78,7 @@ class Youtube_dl(object):
self.status = Status.START self.status = Status.START
def run(self): def run(self):
try:
info_dict = Youtube_dl.get_info_dict(self.url) # 동영상 정보 가져오기 info_dict = Youtube_dl.get_info_dict(self.url) # 동영상 정보 가져오기
if info_dict is None: # 가져오기 실패 if info_dict is None: # 가져오기 실패
self.status = Status.ERROR self.status = Status.ERROR
@@ -100,6 +101,9 @@ class Youtube_dl(object):
self.status = Status.COMPLETED self.status = Status.COMPLETED
shutil.rmtree(self.temp_path) # 임시폴더 삭제 shutil.rmtree(self.temp_path) # 임시폴더 삭제
self.end_time = datetime.now() self.end_time = datetime.now()
except Exception as e:
logger.error('Exception:%s', e)
logger.error(traceback.format_exc())
def stop(self): def stop(self):
self.status = Status.STOP self.status = Status.STOP
@@ -120,6 +124,8 @@ class Youtube_dl(object):
with youtube_dl.YoutubeDL(ydl_opts) as ydl: with youtube_dl.YoutubeDL(ydl_opts) as ydl:
ydl.download([url]) ydl.download([url])
except Exception as e: except Exception as e:
logger.error('Exception:%s', e)
logger.error(traceback.format_exc())
return None return None
return json.loads(Youtube_dl._last_msg) return json.loads(Youtube_dl._last_msg)

View File

@@ -33,7 +33,7 @@ def plugin_unload():
Logic.plugin_unload() Logic.plugin_unload()
plugin_info = { plugin_info = {
'version': '1.0.0', 'version': '1.0.1',
'name': 'youtube-dl', 'name': 'youtube-dl',
'category_name': 'vod', 'category_name': 'vod',
'icon': '', 'icon': '',