diff --git a/backend/config.py b/backend/config.py index a872bc3..cfbe4a1 100644 --- a/backend/config.py +++ b/backend/config.py @@ -21,7 +21,7 @@ class Config: ) # Proxy URL for yt_proxied downloader (can be used for geo-restricted content) - self.yt_proxy = os.getenv('YT_PROXY') or 'http://127.0.0.1:1080' + self.yt_proxy = os.getenv('YT_PROXY') or None self.save_lyrics = _parse_bool(os.getenv('SAVE_LYRICS'), True) self.save_cover = _parse_bool(os.getenv('SAVE_COVER'), True) diff --git a/backend/ydl_pool.py b/backend/ydl_pool.py index 8a78e64..309a065 100644 --- a/backend/ydl_pool.py +++ b/backend/ydl_pool.py @@ -22,7 +22,9 @@ class _CreateYDL: @staticmethod def yt_proxied() -> YoutubeDL: ydl = _CreateYDL.youtube() - ydl.params['proxy'] = config.get().yt_proxy + proxy = config.get().yt_proxy + if proxy is not None: + ydl.params['proxy'] = proxy return ydl @staticmethod