Opened 6 months ago
Last modified 4 weeks ago
#47421 reviewing defect (bug)
Media with fragments duplicate in enclosures
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 5.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Feeds | Keywords: | good-first-bug has-patch needs-testing |
Focuses: | Cc: | ||
PR Number: |
Description
I am using media fragment ids(https://www.w3.org/TR/media-frags/) to specify retrieval points in audio/video and the enclosure code picks this up as different enclosures, so I have the same media file multiple times. Suggest duplicate checking in do_enclose after stripping the fragments.
Attachments (2)
Change History (10)
#2
@
4 months ago
- Keywords has-patch added; needs-patch removed
It looks like do_enclose does some checking for duplicate urls already, when it runs the enclosure_links filter - but it doesn't take url fragments into account. This patch adds a check for fragments on new urls and strips them away if present. It only affects the enclosures, so the rest of the markup stays intact.
#4
follow-up:
↓ 5
@
4 months ago
@archduck Why check for fragments when the strip fragment function strips regardless? Isn't in more efficient just to run everything through it?
#5
in reply to:
↑ 4
@
4 months ago
Replying to dshanske:
@archduck Why check for fragments when the strip fragment function strips regardless? Isn't in more efficient just to run everything through it?
Good point. Checking for fragments with parse_url is an unnecessary step here.
Especially since strip_fragment_from_url itself runs parse_url - and so urls with fragments would undergo parse_url a second time.
Better to just send everything through it.
Working on it at #WCEU
Edit: Didn't manage to solve it. Feel free to try.