v1.6.5 info_dict API가 동작하지 않는 문제 수정
This commit is contained in:
@@ -131,6 +131,9 @@ API에선 직접 비트레이트를 설정할 수 있습니다.
|
||||
물론 해당 정보가 없으면 null입니다.
|
||||
|
||||
## Changelog
|
||||
v1.6.5
|
||||
* info_dict API가 동작하지 않는 문제 수정
|
||||
|
||||
v1.6.4
|
||||
* FFmpeg 경로 설정 추가
|
||||
SJVA에 내장된 버전 말고 원하는 버전을 사용할 수 있습니다.
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"description": "\uc720\ud29c\ube0c, \ub124\uc774\ubc84TV \ub4f1 \ub3d9\uc601\uc0c1 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ub3d9\uc601\uc0c1 \ub2e4\uc6b4\ub85c\ub4dc", "name": "youtube-dl", "more": "", "version": "1.6.4", "home": "https://github.com/joyfuI/youtube-dl", "category_name": "vod", "developer": "joyfuI"}
|
||||
{"description": "\uc720\ud29c\ube0c, \ub124\uc774\ubc84TV \ub4f1 \ub3d9\uc601\uc0c1 \uc0ac\uc774\ud2b8\uc5d0\uc11c \ub3d9\uc601\uc0c1 \ub2e4\uc6b4\ub85c\ub4dc", "name": "youtube-dl", "more": "", "version": "1.6.5", "home": "https://github.com/joyfuI/youtube-dl", "category_name": "vod", "developer": "joyfuI"}
|
||||
@@ -147,7 +147,7 @@ class LogicNormal(object):
|
||||
|
||||
@staticmethod
|
||||
def get_info_dict(url, proxy):
|
||||
MyYoutubeDL.get_info_dict(url, proxy)
|
||||
return MyYoutubeDL.get_info_dict(url, proxy)
|
||||
|
||||
@staticmethod
|
||||
def human_readable_size(size, suffix=''):
|
||||
|
||||
@@ -65,7 +65,8 @@ class MyYoutubeDL(object):
|
||||
self.key = None
|
||||
self.start_time = None # 시작 시간
|
||||
self.end_time = None # 종료 시간
|
||||
self.info_dict = { # info_dict에서 얻는 정보
|
||||
# info_dict에서 얻는 정보
|
||||
self.info_dict = {
|
||||
'extractor': None, # 타입
|
||||
'title': None, # 제목
|
||||
'uploader': None, # 업로더
|
||||
@@ -76,7 +77,8 @@ class MyYoutubeDL(object):
|
||||
# self.info_dict['duration'] = None # 길이
|
||||
# self.info_dict['format'] = None # 포맷
|
||||
# self.info_dict['thumbnail'] = None # 썸네일
|
||||
self.progress_hooks = { # progress_hooks에서 얻는 정보
|
||||
# progress_hooks에서 얻는 정보
|
||||
self.progress_hooks = {
|
||||
'downloaded_bytes': None, # 다운로드한 크기
|
||||
'total_bytes': None, # 전체 크기
|
||||
'eta': None, # 예상 시간(s)
|
||||
@@ -96,8 +98,9 @@ class MyYoutubeDL(object):
|
||||
try:
|
||||
self.start_time = datetime.now()
|
||||
self.status = Status.START
|
||||
info_dict = MyYoutubeDL.get_info_dict(self.url, self.opts.get('proxy')) # 동영상 정보 가져오기
|
||||
if info_dict is None: # 가져오기 실패
|
||||
# 동영상 정보 가져오기
|
||||
info_dict = MyYoutubeDL.get_info_dict(self.url, self.opts.get('proxy'))
|
||||
if info_dict is None:
|
||||
self.status = Status.ERROR
|
||||
return
|
||||
self.info_dict['extractor'] = info_dict['extractor']
|
||||
@@ -122,14 +125,15 @@ class MyYoutubeDL(object):
|
||||
if not os.path.isdir(path):
|
||||
os.mkdir(path)
|
||||
continue
|
||||
celery_shutil.move(i, path) # 파일 이동
|
||||
celery_shutil.move(i, path)
|
||||
self.status = Status.COMPLETED
|
||||
except Exception as e:
|
||||
self.status = Status.ERROR
|
||||
logger.error('Exception:%s', e)
|
||||
logger.error(traceback.format_exc())
|
||||
finally:
|
||||
celery_shutil.rmtree(self.temp_path) # 임시폴더 삭제
|
||||
# 임시폴더 삭제
|
||||
celery_shutil.rmtree(self.temp_path)
|
||||
if self.status != Status.STOP:
|
||||
self.end_time = datetime.now()
|
||||
|
||||
@@ -201,7 +205,8 @@ class MyLogger(object):
|
||||
def debug(self, msg):
|
||||
MyYoutubeDL._last_msg = msg
|
||||
if msg.find('') != -1 or msg.find('{') != -1:
|
||||
return # 과도한 로그 방지
|
||||
# 과도한 로그 방지
|
||||
return
|
||||
logger.debug(msg)
|
||||
|
||||
def warning(self, msg):
|
||||
|
||||
@@ -34,7 +34,7 @@ menu = {
|
||||
}
|
||||
|
||||
plugin_info = {
|
||||
'version': '1.6.4',
|
||||
'version': '1.6.5',
|
||||
'name': 'youtube-dl',
|
||||
'category_name': 'vod',
|
||||
'developer': 'joyfuI',
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
$.notify('<strong>URL을 입력하세요.</strong>', {
|
||||
type: 'warning'
|
||||
});
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url: `/${package_name}/ajax/download`,
|
||||
|
||||
Reference in New Issue
Block a user