-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
No movement here in well over a decade, so I'm going to make this a simple FYI bug report + workaround patch rather than a proper fix + pull request that might not go anywhere. Per the title, SimpleRSS doesn't process enclosures by default, and even adding the extensions to do so is not quite enough to match the object the standard RSS parser returns when parsing a valid feed (FeedNormalizer doesn't itself offer a substitute reference Enclosure object). A quick patch that fixes the problem for RSS feeds:
10a11,15
> @@item_tags << :'enclosure#url'
> @@item_tags << :'enclosure#length'
> @@item_tags << :'enclosure#type'
>
> SimpleEnclosure = Struct.new(:url, :length, :type)
108a114
> atomrss_entry.values_at(*%i[enclosure_url enclosure_length enclosure_type]).then {|enclosure_attributes| feed_entry.enclosures << SimpleRSS::SimpleEnclosure.new(*enclosure_attributes) if enclosure_attributes.all?}
No broken Atom podcasts in the wild for me yet, so I leave that additional fix to someone else.
Metadata
Metadata
Assignees
Labels
No labels