decodeURI decodes %25, so normalizeURL turned an encoded percent sign into a bare "%": in the path (normalize-url runs decodeURI on the pathname) a%2520b became a%20b, a different file, and in the query token=50%25off became token=50%off, a malformed escape. %25 is now swapped for a placeholder before normalize-url and put back after decoding.
Disabling sortQueryParameters left the parameters in their original order, so the same link written with a different order would no longer be recognized as a duplicate. The parameters are now sorted by name like URLSearchParams.sort() does, but each one is kept as written, so %26, %3D, %3F and %2B are not decoded.
normalize-url sorts the query parameters by default and then runs decodeURIComponent on the whole query, so %26, %3D, %3F and %2B come back as &, =, ? and +. A link that passes another URL as a parameter loses part of it to the outer query, and %2B turns into a space. The order of the parameters is now left as is.
getStreamInfo returned a resolution only when the top variant of a master playlist had RESOLUTION, FRAME-RATE and CODECS, although playlist:format and playlist:update use only the height. RFC 8216 makes FRAME-RATE and CODECS optional, so such streams never got a quality. The parsing moves to parseStreamInfo, which tests can call without a network.
getStreamInfo() already ignores .m3u8 responses that hls-parser cannot read, but the .mpd branch let parseManifest() throw. A stream URL ending in .mpd that answers 200 with an HTML page makes mpd-parser throw DASH_INVALID_XML, which rejects inside eachLimit and kills playlist:format before anything is saved. playlist:update hits the same path when adding a stream.
Resolved conflict in scripts/models/stream.ts: kept the branch's
labels/isNot247/isGeoBlocked handling in fromPlaylistItem while adopting
master's optional-chaining guards for data.tvg / data.http.
- Normalize the returned path to forward slashes so it matches what
Storage.list() (glob) returns, instead of leaking `\` on Windows.
- Treat the storage root itself as "not inside", so passing a directory
no longer yields an empty path that Storage.load() would open as a dir.
- Extract the containment check into isInsideDirectory() and drop the
redundant isAbsolute(filepath) branch (path.resolve already handles it).
- Restore the repository's CRLF line endings in the nested fixture.