Commit fa3c01b

benny-dou <60535774+benny-dou@users.noreply.github.com>
2026-02-02 14:58:35
fix(podcast): use proxy when downloading podcast files
1 parent 32df1a3
Changed files (1)
src
podcast
src/podcast/main.py
@@ -232,14 +232,14 @@ async def download_enclosure(entry: dict, cover_url: str = "") -> dict:
     if enclosure_url:
         try:
             retry = 0
-            path = await download_file(enclosure_url, stream=True)
+            path = await download_file(enclosure_url, stream=True, proxy=PROXY.PODCAST)
             while not Path(path).is_file():
                 retry += 1
-                path = await download_file(enclosure_url, stream=True)
+                path = await download_file(enclosure_url, stream=True, proxy=PROXY.PODCAST)
                 if retry > 3:
                     return placeholder
             thumb_url = glom(entry, "image.href", default="") or cover_url
-            thumb = await download_file(thumb_url)
+            thumb = await download_file(thumb_url, proxy=PROXY.PODCAST)
             thumb = thumb if Path(thumb).is_file() else None
         except Exception as e:
             logger.error(f"Failed to download podcast enclosure: {enclosure_url}\n{e}")