fix: handle url rewrite when querying wrong endpoint

materialious is guilty of this
This commit is contained in:
2025-09-17 01:52:45 +02:00
parent 5a1e772909
commit 4cfb1db7d0
2 changed files with 6 additions and 2 deletions

View File

@@ -276,8 +276,8 @@ def generateChannelAvatarsFromUrl(url: str, proxied: bool = True) -> list:
# Generates channel avatars at default sizes.
# avatar urls for channels in search results start with //yt3.ggpht.com/
if url.startswith("//yt3.ggpht.com/"):
url = url.replace("//yt3.ggpht.com/", "https://yt3.ggpht.com/")
if url.startswith("//"):
url = "https:" + url
avatars = []
if not url.startswith("https://yt3.ggpht.com/") and not url.startswith("https://yt3.googleusercontent.com/"):