From 224345c04d056abc8d33ef15b88078941adb20ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 27 Mar 2022 15:18:41 +0200 Subject: [PATCH] rssVideos: Use yt_dlp config when possible --- config/scripts/rssVideos | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index 647f59c..b58f7bb 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -472,7 +472,9 @@ class RVDatabase: @property def ytdl_opts(self) -> dict: - return {"format": self.args.format, "allsubtitles": self.args.subtitles} + # Get user/system options + _, _, _, ydl_opts = yt_dlp.parse_options() + return ydl_opts @property def ytdl_dry_opts(self) -> dict: @@ -634,21 +636,6 @@ def get_args() -> configargparse.Namespace: # TODO Envrionment variables # TODO Allow to ask - # How to download - parser.add( - "--format", - help="Use this format to download videos." - + " See FORMAT SELECTION in youtube-dl(1)", - env_var="RSS_VIDEOS_FORMAT", - default="bestvideo+bestaudio/best", - ) - parser.add( - "--subtitles", - help="Download all subtitles", - env_var="RSS_VIDEOS_SUBTITLES", - action="store_true", - ) - parser.add( "action", nargs="?",