From 369890e3483ea103ee8afbed8c79df1b207ac274 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Geoffrey=20=E2=80=9CFrogeye=E2=80=9D=20Preud=27homme?= Date: Sun, 10 Apr 2022 09:58:06 +0200 Subject: [PATCH] rssVideos: Fix the options issue --- config/scripts/rssVideos | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/config/scripts/rssVideos b/config/scripts/rssVideos index dff599c..c95866f 100755 --- a/config/scripts/rssVideos +++ b/config/scripts/rssVideos @@ -20,6 +20,7 @@ import re import subprocess import time import typing +import sys import coloredlogs import configargparse @@ -473,8 +474,10 @@ class RVDatabase: @property def ytdl_opts(self) -> dict: # Get user/system options - _, _, _, ydl_opts = yt_dlp.parse_options([""]) - # Have to put a dummy option otherwise yt-dlp will use sys.argv + prev_argv = sys.argv + sys.argv = ['yt-dlp'] + _, _, _, ydl_opts = yt_dlp.parse_options() + sys.argv = prev_argv return ydl_opts @property