Commit Graph
9 Commits
Author SHA1 Message Date
Leo Camus c674b75a3b fix: rewrite playlists whose only streams were duplicates in playlist:format
playlist:format drops duplicate links across all files, then saves each file that still has streams. A file whose streams were all duplicates of links in other files was never saved, so it kept the duplicate (and the unnormalized link) as it was.
2026-11-22 02:00:15 +00:00
leoca ad0ebc21aa fix: sort query parameters without decoding their escapes
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.
2026-11-14 04:25:14 +00:00
leoca d7c1a01cf6 fix: keep encoded query delimiters when playlist:format normalizes links
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.
2026-11-14 03:37:50 +00:00
leoca 6dea3dcafd test: let playlist:update test fail on mismatched output
The assertions sat inside a try/catch whose catch only logged, so a
failed expect was swallowed and the test always passed. That hid a
stale fixture: since issue #39098 was added to the input issues, the
command closes it (the expected uk.m3u already shows the edit), but
playlist_update.log was never updated.
2026-11-07 13:26:31 +00:00
leoca e7f405b8a8 fix: link the exact stream in discussion:validate fulfilled comments
The fulfilled comment looked for the first line containing the stream ID
as a substring, so a request for MTV.fr@SD linked the line of
BFMTV.fr@SD. Match the quoted tvg-id attribute instead.
2026-11-03 21:30:22 +00:00
leoca f3cb3c0fee fix: don't flag stream ID removal as invalid in report:create
The edit form tells users to put `~` in a field to delete its value.
report:create split the Stream ID on `@` without checking for that, so
an edit request that removes the stream ID from an existing link was
listed as invalid_channel_id, since there is no channel called `~`.

Skip the channel lookup when the stream ID is marked as deleted, as
issue:validate already does.
2026-10-21 19:10:57 +00:00
leoca c96d3eea10 fix: keep stream titles when playlist:edit saves the file
playlist:edit saved the playlist without the raw option, so every title
was rebuilt from the API channel name and country instead of being
written back as read. For a stream whose channel is not in the database,
that becomes "undefined (undefined)". playlist:format, playlist:update
and playlist:test already save with { public: false, raw: true }.
2026-10-17 13:40:28 +00:00
leoca 867591f3e2 fix: normalize playlist:validate file arguments
playlist:validate decides which streams belong to the selected files by
comparing the raw command-line arguments with the paths returned by
Storage.list(). A path such as ./streams/us.m3u never matches
streams/us.m3u, so the file's own streams are put in the duplicate buffer
and every link is reported as already being in that same file.

Resolve the arguments with getStoragePath(), as playlist:format does.
2026-10-14 11:05:51 +00:00
leoca 783c4b5d5a fix: don't abort playlist:format on an unparseable .mpd response
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.
2026-10-14 01:06:34 +00:00