From c30deeed4911f531cab49815b077a43ca579fc3d Mon Sep 17 00:00:00 2001 From: Adam R Grey Date: Sun, 12 Nov 2023 15:09:15 -0500 Subject: [PATCH] workaround to be allowed to download podcasts automatically you know, like a... like a um.. what do you call those... podcast --- tasks/PodcastifyAttachment.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tasks/PodcastifyAttachment.cs b/tasks/PodcastifyAttachment.cs index f55fa52..b10bb80 100644 --- a/tasks/PodcastifyAttachment.cs +++ b/tasks/PodcastifyAttachment.cs @@ -25,6 +25,7 @@ namespace ttrss_co_client.tasks var extensionUpstream = attachmentLink.Substring(attachmentLink.LastIndexOf('.')); var downloadPath = Path.Combine(workingFolder, headline.title) + extensionUpstream; var downloader = new HttpClient(); + downloader.DefaultRequestHeaders.UserAgent.ParseAdd("Mozilla/5.0 (compatible; AcmeInc/1.0)"); sw.Start(); var dlResult = (await downloader.GetAsync(attachmentLink)); File.WriteAllBytes(downloadPath, await dlResult.Content.ReadAsByteArrayAsync());