check for mrss item media:content when extracting item enclosures #3732
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief summary
Some RSS feeds use the enhanced media RSS format (Mrss), particularly the ones created by Rss Bridge. This format stores its enclosures in media:content tags, which ABS didn't yet understand. This PR adds support for those tags as a fallback from traditional enclosures.
Which issue is fixed?
Fixes #3695
In-depth Description
The function responsible for extracting item episode info will test for enclosure urls first, and if it doesn't find one, it'll search for media:content entries that do have a type that starts with "audio". This is necessary since Mrss also supports storing images within the media:content attributes. If an entry is found, its used as an enclosure, since it seems to have the same tags. If no media:content with audio/something type is found, the function will abort with the usual error.
How have you tested this?
I tested with regular RSS feeds and an Mrss feed. I particularly tested this one: https://rss.nixnet.services/?action=display&bridge=ARDAudiothekBridge&path=https%3A%2F%2Fwww.ardaudiothek.de%2Fsendung%2Fkalk-welk%2F10777871%2F&limit=&format=Mrss
Screenshots