Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop treating Podcast episodes with URL encoded enclosure URLs as invalid #226

Closed
cjpcjpindre opened this issue Nov 15, 2018 · 4 comments
Closed
Assignees
Labels
bug Something isn't working fixed
Milestone

Comments

@cjpcjpindre
Copy link

Hi,

Have added a feed to RD:
https://anchor.fm/s/7368c04/podcast/rss

RD was quite happy to add it, so recognised it as an rss feed. But it has not downloaded anything from the feed. Current Episode list empty in RD. Browsing the rss feed shows Four Episodes.

Not sure if this is bug in RD, or dodgy encoding on the rss feed.

@ribbons
Copy link
Owner

ribbons commented Nov 16, 2018

Thanks for your bug report - I can reproduce this problem.

The reason it isn't showing any episodes is that the episode audio file (enclosure) URLs are checked with Uri.IsWellFormedUriString to make sure they are valid and this is returning false for all of the URLs in the feed, causing them to be skipped over.

However what I'm not quite seeing at the moment is why IsWellFormedUriString is returning false - as an example, this is one of the URLs in the feed which doesn't look obviously invalid but fails the test.

https://anchor.fm/s/7368c04/podcast/play/1722642/https%3A%2F%2Fd3ctxlq1ktw2nl.cloudfront.net%2Fstaging%2F2018-10-13%2FJohn-Kearns-782f1f393cd0f.m4a

@ribbons ribbons self-assigned this Nov 16, 2018
@ribbons ribbons added the bug Something isn't working label Nov 16, 2018
ribbons added a commit that referenced this issue Nov 18, 2018
If a URL contains URL encoded characters, Uri.IsWellFormedUriString
returns false even if the URL is valid.  This causes Podcast episodes to
be skipped erroneously if the enclosure URL contains URL encoded
characters.

Add a test and then fix this behaviour by using Uri.TryCreate instead of
Uri.IsWellFormedUriString in GetAvailableEpisodes.

Resolves #226.
@ribbons ribbons changed the title Cannot read rss feed from anchor.fm Podcast episodes with URL encoded enclosure URLs are treated as invalid Nov 18, 2018
@ribbons
Copy link
Owner

ribbons commented Nov 18, 2018

Right, I managed to get to the bottom of this in the end 😄.

If you'd like to download and install the build of Radio Downloader from here it should then list the episodes of that podcast feed correctly. Let me know how you get on...

@cjpcjpindre
Copy link
Author

Hi,

Thanks, (as ever) for the quick response.

I've installed the new build. Partial success. RD is listing the episodes:
screenshot 101

However, there is the following error when trying to download the latest episode after subscribing:
"Error: Not available
This episode appears to be no longer available. You can either try again later, or cancel the download to remove it from the list and clear the error."

@ribbons
Copy link
Owner

ribbons commented Nov 19, 2018

Turns out I should have tested actually downloading the episodes too 😄. I'll close this bug and open a new one for the downloading issue as from a quick look it is being caused by a related but slightly different issue.

@ribbons ribbons added the fixed label Nov 19, 2018
@ribbons ribbons added this to the 0.34 milestone Nov 19, 2018
@ribbons ribbons changed the title Podcast episodes with URL encoded enclosure URLs are treated as invalid Stop treating Podcast episodes with URL encoded enclosure URLs are as invalid Nov 19, 2018
@ribbons ribbons changed the title Stop treating Podcast episodes with URL encoded enclosure URLs are as invalid Stop treating Podcast episodes with URL encoded enclosure URLs as invalid Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed
Projects
None yet
Development

No branches or pull requests

2 participants