Poddr icon indicating copy to clipboard operation
Poddr copied to clipboard

Bug: Poddr not following redirects?

Open fhitchen opened this issue 1 year ago • 1 comments

Describe the bug I subscribed to the "News Agents" podcast and wanted to download a cast. It did not work. I checked the log and found this entry:

[2023-01-06 15:23:32.451] [info] Podcast service :: Getting Podcastfeed using RSS => https://feeds.captivate.fm/the-news-agents/
[2023-01-06 15:23:44.112] [info] Toast service :: Showing toast => Downloading What's Harry's endgame?
[2023-01-06 15:23:44.130] [info] Offline service :: Checking if download folder exists...
[2023-01-06 15:23:44.130] [info] Offline service :: Download folder exists.
[2023-01-06 15:23:44.130] [info] Offline service :: downloading from => https://dax.captivate.fm/74123438-d557-4083-9b9a-1505267c4afb/PINCHER-PILOT-EPISODE-TO-GO-01.mp3?aw_0_1st.showid=c49390b9-6909-4cd3-a974-e270cf686f27&aw_0_1st.episodeid=d2752acb-1101-43fe-bfa7-a2efbc134b5a
[2023-01-06 15:24:24.136] [error] Offline service :: {"message":"Timeout has occurred","name":"TimeoutError"}
[2023-01-06 15:24:24.136] [info] Toast service :: Showing error toast => Something went wrong when trying to download an episode.

To Reproduce Click on the download option.

Expected behavior The podcast should appear in the Downloads/Poddr directory.

Screenshots See log file entry above

Desktop (please complete the following information):

  • OS: Linux
  • Version Ubuntu 22.10

Additional context I tried to download the podcast using the URL mentioned in the log file entry. I noticed that the web server is sending a HTTP 302 status code along with a redirect, I am suspecting that Poddr is not handling redirects. I added the -L flag to curl and was able to successfully retrieve the podcast.

$ curl -v  'https://dax.captivate.fm/74123438-d557-4083-9b9a-1505267c4afb/PINCHER-PILOT-EPISODE-TO-GO-01.mp3?aw_0_1st.showid=c49390b9-6909-4cd3-a974-e270cf686f27&aw_0_1st.episodeid=d2752acb-1101-43fe-bfa7-a2efbc134b5a' -o xxx
.
.
.
> GET /74123438-d557-4083-9b9a-1505267c4afb/PINCHER-PILOT-EPISODE-TO-GO-01.mp3?aw_0_1st.showid=c49390b9-6909-4cd3-a974-e270cf686f27&aw_0_1st.episodeid=d2752acb-1101-43fe-bfa7-a2efbc134b5a HTTP/1.1
> Host: dax.captivate.fm
> User-Agent: curl/7.85.0
> Accept: */*
> 
< HTTP/1.1 302 Found
< location: https://dax.captivate.fm/74123438-d557-4083-9b9a-1505267c4afb/PINCHER-PILOT-EPISODE-TO-GO-01.mp3?aw_0_1st.showid=c49390b9-6909-4cd3-a974-e270cf686f27&aw_0_1st.episodeid=d2752acb-1101-43fe-bfa7-a2efbc134b5a&listeningSessionID=9e496cf7-725e-3fbd-9aa1-12f1de1ea1de
< connection: close

fhitchen avatar Jan 06 '23 21:01 fhitchen

Thanks for the detailed investigation :smile: Will take a look when I got the time!

Sn8z avatar Jan 12 '23 08:01 Sn8z