Skip to content

Conversation

mickael-menu
Copy link
Member

A manifest.json embedded in an RWP package may contain a self link (e.g., if it is packaged from a streamed manifest). This conflicts with the resolution of local relative HREFs, so this PR removes the self link.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that any self link embedded in a streamed manifest is removed before building the Publication, preventing conflicts with local relative HREF resolution.

  • Introduce a mutable copy of manifest in the mapping closure
  • Filter out any links whose relation contains .self
  • Proceed with building the Publication using the updated manifest
Comments suppressed due to low confidence (1)

Sources/Streamer/Parser/Readium/ReadiumWebPubParser.swift:109

  • No tests cover the removal of .self links from the manifest. Adding a unit test for this filtering behavior would help prevent regressions.
                manifest.links = manifest.links.filter { !$0.rels.contains(.self) }

@mickael-menu mickael-menu merged commit e12fd18 into develop Jul 10, 2025
5 checks passed
@mickael-menu mickael-menu deleted the issue/626 branch July 10, 2025 12:00
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.

[Bug] Not playing audio for the .audiobook format
1 participant