v1.0.1 로그 좀 더 상세히 찍도록 수정
This commit is contained in:
@@ -15,7 +15,6 @@ v1.0.0
|
||||
* 목록에서 진행률 표시 추가
|
||||
|
||||
v0.1.1
|
||||
* ~~윈도우 환경 지원 추가~~
|
||||
* 다운로드 실패 시 임시파일 삭제가 안 되는 문제 수정
|
||||
|
||||
v0.1.0
|
||||
|
||||
@@ -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"}
|
||||
@@ -78,6 +78,7 @@ class Youtube_dl(object):
|
||||
self.status = Status.START
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
info_dict = Youtube_dl.get_info_dict(self.url) # 동영상 정보 가져오기
|
||||
if info_dict is None: # 가져오기 실패
|
||||
self.status = Status.ERROR
|
||||
@@ -100,6 +101,9 @@ class Youtube_dl(object):
|
||||
self.status = Status.COMPLETED
|
||||
shutil.rmtree(self.temp_path) # 임시폴더 삭제
|
||||
self.end_time = datetime.now()
|
||||
except Exception as e:
|
||||
logger.error('Exception:%s', e)
|
||||
logger.error(traceback.format_exc())
|
||||
|
||||
def stop(self):
|
||||
self.status = Status.STOP
|
||||
@@ -120,6 +124,8 @@ class Youtube_dl(object):
|
||||
with youtube_dl.YoutubeDL(ydl_opts) as ydl:
|
||||
ydl.download([url])
|
||||
except Exception as e:
|
||||
logger.error('Exception:%s', e)
|
||||
logger.error(traceback.format_exc())
|
||||
return None
|
||||
return json.loads(Youtube_dl._last_msg)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user