From 24c9749cb806714e5ba1373e863f4b60f0632d22 Mon Sep 17 00:00:00 2001
From: jenz <jenz@jenz.jenz>
Date: Thu, 18 Jul 2024 00:55:28 +0200
Subject: [PATCH] added support for oauth2 login

---
 torchlight_changes_unloze/torchlight3/Torchlight/Commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py
index d3267a59..3edf5cfd 100755
--- a/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py
+++ b/torchlight_changes_unloze/torchlight3/Torchlight/Commands.py
@@ -65,7 +65,7 @@ class URLFilter(BaseCommand):
 				if TimeStr:
 					Time = Utils.ParseTime(TimeStr)
 
-			Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "-g", url,
+			Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--username", "oauth2", "--password", "''", "-g", url,
 				stdout = asyncio.subprocess.PIPE)
 			Out, _ = await Proc.communicate()
 
@@ -645,7 +645,7 @@ class YouTubeSearch(BaseCommand):
                 Time = Utils.ParseTime(TimeStr)
             message[1] = message[1][:Temp.value]
 
-        Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "-xg", "ytsearch:" + message[1],
+        Proc = await asyncio.create_subprocess_exec("yt-dlp", "--dump-json", "--username", "oauth2", "--password", "''", "-xg", "ytsearch:" + message[1],
             stdout = asyncio.subprocess.PIPE)
         Out, _ = await Proc.communicate()