From 6581394a6d5f30361cebc0102849899fdef9b37d Mon Sep 17 00:00:00 2001 From: joyfuI Date: Wed, 12 Feb 2020 20:33:48 +0900 Subject: [PATCH] =?UTF-8?q?v1.1.1=20=ED=94=8C=EB=A0=88=EC=9D=B4=EB=A6=AC?= =?UTF-8?q?=EC=8A=A4=ED=8A=B8=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20?= =?UTF-8?q?=EC=A4=91=20=EB=8B=A4=EC=9A=B4=EB=A1=9C=EB=93=9C=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=ED=95=9C=20=EB=8F=99=EC=98=81=EC=83=81=EC=9D=B4=20?= =?UTF-8?q?=EC=9E=88=EC=9C=BC=EB=A9=B4=20=EA=B1=B4=EB=84=88=EB=9B=B0?= =?UTF-8?q?=EB=8F=84=EB=A1=9D=20=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +++ info.json | 2 +- my_youtube_dl.py | 4 +++- plugin.py | 5 +++-- templates/youtube-dl_download.html | 2 +- 5 files changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index e83039d..6278eab 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,9 @@ SJVA에서 유튜브, 네이버TV 등 동영상 사이트 영상을 다운로드 다른 분들이 만든 플러그인을 참고하며 주먹구구식으로 만들었습니다;; ## Changelog +v1.1.1 +* 플레이리스트 다운로드 중 국가차단 등의 이유로 다운로드 실패한 동영상이 있으면 건너뛰도록 개선 + v1.1.0 * 화질 선택 기능 추가 * 잘못된 예외처리 수정 diff --git a/info.json b/info.json index 81ae218..04fc340 100644 --- a/info.json +++ b/info.json @@ -1 +1 @@ -{"more": "", "version": "1.1.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"} \ No newline at end of file +{"more": "", "version": "1.1.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"} \ No newline at end of file diff --git a/my_youtube_dl.py b/my_youtube_dl.py index 8896aba..a1e437a 100644 --- a/my_youtube_dl.py +++ b/my_youtube_dl.py @@ -93,7 +93,8 @@ class Youtube_dl(object): 'logger': MyLogger(), 'progress_hooks': [self.my_hook], # 'match_filter': self.match_filter_func, - 'outtmpl': os.path.join(self.temp_path, self.filename) + 'outtmpl': os.path.join(self.temp_path, self.filename), + 'ignoreerrors': True } if self.format_code is not None: ydl_opts['format'] = self.format_code @@ -125,6 +126,7 @@ class Youtube_dl(object): ydl_opts = { 'simulate': True, 'dump_single_json': True, + 'extract_flat': 'in_playlist', 'logger': MyLogger() } with youtube_dl.YoutubeDL(ydl_opts) as ydl: diff --git a/plugin.py b/plugin.py index 0961d17..327928d 100644 --- a/plugin.py +++ b/plugin.py @@ -33,7 +33,7 @@ def plugin_unload(): Logic.plugin_unload() plugin_info = { - 'version': '1.1.0', + 'version': '1.1.1', 'name': 'youtube-dl', 'category_name': 'vod', 'icon': '', @@ -92,7 +92,8 @@ def detail(sub): ######################################################### # For UI ######################################################### -@blueprint.route('/ajax/', methods=['GET', 'POST']) +@blueprint.route('/ajax/', methods=['POST']) +@login_required def ajax(sub): logger.debug('AJAX %s %s', package_name, sub) try: diff --git a/templates/youtube-dl_download.html b/templates/youtube-dl_download.html index 2db52af..d469e4f 100644 --- a/templates/youtube-dl_download.html +++ b/templates/youtube-dl_download.html @@ -5,7 +5,7 @@ {{ macros.setting_input_text('url', 'URL', placeholder='http:// 주소', desc='유튜브, 네이버TV 등 동영상 주소') }} {{ macros.setting_input_text('filename', '파일명', value=arg['file_name'], desc='템플릿 규칙은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#output-template 참고') }} {{ macros.setting_select('preset', '동영상 포맷 프리셋', arg['preset_list'], col='3') }} - {{ macros.setting_input_text('format', '동영상 포맷', desc=['포맷 지정은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection 참고', '빈칸으로 설정 시 최고 화질로 다운로드합니다.']) }} + {{ macros.setting_input_text('format', '동영상 포맷', desc=['포맷 지정은 https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection 참고', '빈칸으로 두면 최고 화질로 다운로드합니다.']) }} {{ macros.setting_button([['download_start', '다운로드']]) }}