rssVideos: Fix the options issue
This commit is contained in:
parent
a862f5c5e3
commit
369890e348
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue