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
RSS parser not filtering media:group/media:content where isDefault = true #3078
Comments
Could you please provide an example of such a feed, to ease testing? |
Absolutely, apologies for not including previously. |
I came to see if this had already been reported, because I've been putting up with seeing all images for ages. I thought "oh good, I've got another example of a feed that's got this", but no! It's just the ABC again: https://www.abc.net.au/radionational/programs/blueprintforliving/feed/6052176/podcast.xml :-) Still, it does sound like something that FreshRSS could handle (assuming this is a standard form for feeds). |
How should we handle the other media enclosures? Here an example from https://www.abc.net.au/news/feed/45910/rss.xml
|
I would think based on the Media RSS specification the parser should be trusting the media:content element that is marked as isDefault=true. How does the other element parsing algorithms cater for references to images that are too big or too small? |
How to handle the |
My reading of the specification is that the thumbnail element is optional and if present it would override the isDefault. The lack of an isDefault or thumbnail element then the first element is considered the primary. |
FWIW the CustomCSS extension can be used as a workaround. At least to avoid all versions of the image being displayed. I was seeing about a dozen images on every item in CNN's feeds (e.g. http://rss.cnn.com/rss/cnn_latest.rss), which are missing .content figure.enclosure {
display:none;
}
.content figure.enclosure:first-of-type {
display:block;
} |
RSS specification for media:group with multiple media:content elements has the ability to define which element is the default.
https://www.rssboard.org/media-rss#media-content
isDefault determines if this is the default object that should be used for the media:group. There should only be one default object per media:group
Currently if a feed has an item with multiple versions of an image for example, all versions are rendered in the view.
i.e.
<media:group> <media:description>…</media:description> <media:content url="http://example.com/image-16x9-2150x1210.jpg" medium="image" type="image/jpeg" width="2150" height="1210"/> <media:content url="http://example.com/image-4x3-940x705.jpg" medium="image" type="image/jpeg" width="940" height="705"/> <media:content url="http://example.com/image-3x2-940x627.jpg" medium="image" type="image/jpeg" width="940" height="627" isDefault="true"/> <media:content url="http://example.com/image-3x4-940x1253.jpg" medium="image" type="image/jpeg" width="940" height="1253"/> <media:content url="http://example.com/image-1x1-1400x1400.jpg" medium="image" type="image/jpeg" width="1400" height="1400"/> <media:thumbnail url="http://example.com/image-4x3-140x105.jpg" width="140" height="105"/> </media:group>
All images are then shown in the reader.
The text was updated successfully, but these errors were encountered: