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

Fix: media element w/o duration would overwrite enclosure's length #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

onli
Copy link
Contributor

@onli onli commented Jul 2, 2024

I stumbled over a podcast feed that had both an enclosure and a media:content element, but the media element had no duration set. Feedparser would end up with an attachment that had a size element set to nil. That's problematic, especially since ruby's rss lib will not create the enclosure element without a length element (it is required by spec).

@geraldb
Copy link
Member

geraldb commented Jul 3, 2024

thanks for the fix & update. i try to merge this summer (july / august). can you post the link to the podcast rss feed by any chance? i'd like to add as a test case. all (feedparser) tests are here -> https://github.com/rubycocos/feedparser/tree/master/feeds

@onli
Copy link
Contributor Author

onli commented Jul 3, 2024

I will ask the user about the status of the feed link, whether it's private or not.

@onli
Copy link
Contributor Author

onli commented Jul 3, 2024

It's a public feed, this one: https://www.omnycontent.com/d/playlist/e73c998e-6e60-432f-8610-ae210140c5b1/A91018A4-EA4F-4130-BF55-AE270180C327/44710ECC-10BB-48D1-93C7-AE270180C33E/podcast.rss

Note that I also tried to parse it with just ruby's rss module and that failed because of some invalid itunes tag, so there might be some additional surprises in there.

@geraldb
Copy link
Member

geraldb commented Jul 3, 2024

thanks for the web feed link. i try to have a look later this summer. thks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants