v1.6.0 API에 format_code를 format로 변경
API에 format_code를 format로 변경 API에 temp_path 삭제
This commit is contained in:
@@ -68,9 +68,8 @@ API에선 직접 비트레이트를 설정할 수 있습니다.
|
|||||||
`key` | 임의의 키. 이후 다운로드를 제어할 때 이 키가 필요함 | O | String
|
`key` | 임의의 키. 이후 다운로드를 제어할 때 이 키가 필요함 | O | String
|
||||||
`url` | 동영상 주소 | O | String
|
`url` | 동영상 주소 | O | String
|
||||||
`filename` | 파일명. 템플릿 규칙은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template 참고. 미지정 시 사용자 설정 | X | String
|
`filename` | 파일명. 템플릿 규칙은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template 참고. 미지정 시 사용자 설정 | X | String
|
||||||
`temp_path` | 임시 폴더 경로. 미지정 시 사용자 설정 | X | String
|
|
||||||
`save_path` | 저장 폴더 경로. 미지정 시 사용자 설정 | X | String
|
`save_path` | 저장 폴더 경로. 미지정 시 사용자 설정 | X | String
|
||||||
`format_code` | 동영상 포맷. 포맷 지정은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection 참고. 미지정 시 최고 화질 | X | String
|
`format` | 동영상 포맷. 포맷 지정은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection 참고. 미지정 시 최고 화질 | X | String
|
||||||
`preferedformat` | 변환할 비디오 포맷. 가능한 포맷은 https://ffmpeg.org/general.html#File-Formats 참고. 미지정 시 변환하지 않음 | X | String
|
`preferedformat` | 변환할 비디오 포맷. 가능한 포맷은 https://ffmpeg.org/general.html#File-Formats 참고. 미지정 시 변환하지 않음 | X | String
|
||||||
`preferredcodec` | 추출할 오디오 코덱. 가능한 값은 `"best"`, `"mp3"`, `"aac"`, `"flac"`, `"m4a"`, `"opus"`, `"vorbis"`, `"wav"`. 미지정 시 추출하지 않음 | X | String
|
`preferredcodec` | 추출할 오디오 코덱. 가능한 값은 `"best"`, `"mp3"`, `"aac"`, `"flac"`, `"m4a"`, `"opus"`, `"vorbis"`, `"wav"`. 미지정 시 추출하지 않음 | X | String
|
||||||
`preferredquality` | 추출한 오디오의 비트레이트. 0 ~ 9 사이의 VBR 퀄리티 값(0에 가까울수록 좋음) 혹은 특정 비트레이트 값. `preferredcodec` 키가 있을 때만 유효. 기본값: `192` | X | Integer
|
`preferredquality` | 추출한 오디오의 비트레이트. 0 ~ 9 사이의 VBR 퀄리티 값(0에 가까울수록 좋음) 혹은 특정 비트레이트 값. `preferredcodec` 키가 있을 때만 유효. 기본값: `192` | X | Integer
|
||||||
@@ -132,6 +131,10 @@ API에선 직접 비트레이트를 설정할 수 있습니다.
|
|||||||
물론 해당 정보가 없으면 null입니다.
|
물론 해당 정보가 없으면 null입니다.
|
||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
v1.6.0
|
||||||
|
* API에 format_code를 format로 변경
|
||||||
|
* API에 temp_path 삭제
|
||||||
|
|
||||||
v1.5.1
|
v1.5.1
|
||||||
|
|
||||||
v1.5.0
|
v1.5.0
|
||||||
|
|||||||
@@ -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.5.1", "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.0", "home": "https://github.com/joyfuI/youtube-dl", "category_name": "vod", "developer": "joyfuI"}
|
||||||
22
plugin.py
22
plugin.py
@@ -34,7 +34,7 @@ menu = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
plugin_info = {
|
plugin_info = {
|
||||||
'version': '1.5.1',
|
'version': '1.6.0',
|
||||||
'name': 'youtube-dl',
|
'name': 'youtube-dl',
|
||||||
'category_name': 'vod',
|
'category_name': 'vod',
|
||||||
'developer': 'joyfuI',
|
'developer': 'joyfuI',
|
||||||
@@ -105,7 +105,7 @@ def ajax(sub):
|
|||||||
filename = request.form['filename']
|
filename = request.form['filename']
|
||||||
temp_path = ModelSetting.get('temp_path')
|
temp_path = ModelSetting.get('temp_path')
|
||||||
save_path = ModelSetting.get('save_path')
|
save_path = ModelSetting.get('save_path')
|
||||||
format_code = request.form['format'] if request.form['format'] else None
|
format = request.form['format'] if request.form['format'] else None
|
||||||
postprocessor = request.form['postprocessor'] if request.form['postprocessor'] else None
|
postprocessor = request.form['postprocessor'] if request.form['postprocessor'] else None
|
||||||
video_convertor, extract_audio = LogicNormal.get_postprocessor()
|
video_convertor, extract_audio = LogicNormal.get_postprocessor()
|
||||||
if postprocessor in video_convertor:
|
if postprocessor in video_convertor:
|
||||||
@@ -120,7 +120,7 @@ def ajax(sub):
|
|||||||
'preferredquality': '192'
|
'preferredquality': '192'
|
||||||
}]
|
}]
|
||||||
opts = {
|
opts = {
|
||||||
'format': format_code,
|
'format': format,
|
||||||
'postprocessors': postprocessor,
|
'postprocessors': postprocessor,
|
||||||
'proxy': ModelSetting.get('proxy')
|
'proxy': ModelSetting.get('proxy')
|
||||||
}
|
}
|
||||||
@@ -180,9 +180,8 @@ def api(sub):
|
|||||||
key = request.form.get('key')
|
key = request.form.get('key')
|
||||||
url = request.form.get('url')
|
url = request.form.get('url')
|
||||||
filename = request.form.get('filename', ModelSetting.get('default_filename'))
|
filename = request.form.get('filename', ModelSetting.get('default_filename'))
|
||||||
temp_path = request.form.get('temp_path', ModelSetting.get('temp_path'))
|
|
||||||
save_path = request.form.get('save_path', ModelSetting.get('save_path'))
|
save_path = request.form.get('save_path', ModelSetting.get('save_path'))
|
||||||
format_code = request.form.get('format_code', None)
|
format = request.form.get('format', None)
|
||||||
preferedformat = request.form.get('preferedformat', None)
|
preferedformat = request.form.get('preferedformat', None)
|
||||||
preferredcodec = request.form.get('preferredcodec', None)
|
preferredcodec = request.form.get('preferredcodec', None)
|
||||||
preferredquality = request.form.get('preferredquality', 192)
|
preferredquality = request.form.get('preferredquality', 192)
|
||||||
@@ -211,12 +210,12 @@ def api(sub):
|
|||||||
'preferredquality': str(preferredquality)
|
'preferredquality': str(preferredquality)
|
||||||
})
|
})
|
||||||
opts = {
|
opts = {
|
||||||
'format': format_code,
|
'format': format,
|
||||||
'postprocessors': postprocessor,
|
'postprocessors': postprocessor,
|
||||||
'proxy': ModelSetting.get('proxy'),
|
'proxy': ModelSetting.get('proxy'),
|
||||||
'download_archive': archive
|
'download_archive': archive
|
||||||
}
|
}
|
||||||
youtube_dl = Youtube_dl(plugin, url, filename, temp_path, save_path, opts)
|
youtube_dl = Youtube_dl(plugin, url, filename, ModelSetting.get('temp_path'), save_path, opts)
|
||||||
youtube_dl.key = key
|
youtube_dl.key = key
|
||||||
LogicNormal.youtube_dl_list.append(youtube_dl) # 리스트 추가
|
LogicNormal.youtube_dl_list.append(youtube_dl) # 리스트 추가
|
||||||
ret['index'] = youtube_dl.index
|
ret['index'] = youtube_dl.index
|
||||||
@@ -271,7 +270,14 @@ def api(sub):
|
|||||||
elif sub == 'status':
|
elif sub == 'status':
|
||||||
index = request.form.get('index')
|
index = request.form.get('index')
|
||||||
key = request.form.get('key')
|
key = request.form.get('key')
|
||||||
ret = {'errorCode': 0}
|
ret = {
|
||||||
|
'errorCode': 0,
|
||||||
|
'status': None,
|
||||||
|
'start_time': None,
|
||||||
|
'end_time': None,
|
||||||
|
'temp_path': None,
|
||||||
|
'save_path': None
|
||||||
|
}
|
||||||
if None in (index, key):
|
if None in (index, key):
|
||||||
return LogicNormal.abort(ret, 1) # 필수 요청 변수가 없음
|
return LogicNormal.abort(ret, 1) # 필수 요청 변수가 없음
|
||||||
index = int(index)
|
index = int(index)
|
||||||
|
|||||||
Reference in New Issue
Block a user