fix: remove playlists left behind by the switch to .m3u8 #15

Merged
lyrathorpe merged 1 commits from fix/prune-superseded-playlists into main 2026-08-26 20:39:09 +01:00
Owner

Problem

Every playlist shows twice in Rockbox: screamo.m3u and screamo.m3u8 both
exist.

Pruning is driven by a record of what was written last time, deliberately, so a
playlist put in that directory by hand is never touched. But that record cannot
reach back before it existed. The .m3u files were written by a version that
kept no record, so when the extension changed there was nothing to prune them
by, and rsync faithfully carried both copies to the card.

Change

A file with the same name as one being written now, under an extension this
tool used to write, is removed as well.

Narrow on purpose: it only matches names this run is producing anyway. A
hand-made playlist has a name the tool never generates, so it survives whatever
its extension — tested alongside the duplicate case.

Meanwhile

The duplicates already on the card need clearing by hand, in the mirror so they
do not return:

rm /mnt/tank/media/music-mp3/_playlists/*.m3u

The glob does not match .m3u8. The next sync deletes them from the card.

Testing

121 tests, green locally and in the image.

## Problem Every playlist shows twice in Rockbox: `screamo.m3u` and `screamo.m3u8` both exist. Pruning is driven by a record of what was written last time, deliberately, so a playlist put in that directory by hand is never touched. But that record cannot reach back before it existed. The `.m3u` files were written by a version that kept no record, so when the extension changed there was nothing to prune them by, and rsync faithfully carried both copies to the card. ## Change A file with the same name as one being written now, under an extension this tool used to write, is removed as well. Narrow on purpose: it only matches names this run is producing anyway. A hand-made playlist has a name the tool never generates, so it survives whatever its extension — tested alongside the duplicate case. ## Meanwhile The duplicates already on the card need clearing by hand, in the mirror so they do not return: rm /mnt/tank/media/music-mp3/_playlists/*.m3u The glob does not match `.m3u8`. The next sync deletes them from the card. ## Testing 121 tests, green locally and in the image.
lyrathorpe added 1 commit 2026-08-26 18:07:42 +01:00
fix: remove playlists left behind by the switch to .m3u8
Build and publish container / build (pull_request) Successful in 3m40s
8644184caa
Every playlist appeared twice on the device. Pruning is driven by a record of
what was written last time, deliberately, so that a playlist put in that
directory by hand is never touched. But the record cannot reach back before it
existed: the .m3u files were written by a version that kept none, so when the
extension changed there was nothing to prune them by, and rsync carried both
copies across.

A file with the same name as one being written now, under an extension this
tool used to write, is removed as well. That is narrow enough to match only its
own leavings -- a hand-made playlist has a name this tool never produces, so it
survives whatever its extension, and there is a test for that alongside the one
for the duplicate.
lyrathorpe merged commit 61761c7fac into main 2026-08-26 20:39:09 +01:00
lyrathorpe deleted branch fix/prune-superseded-playlists 2026-08-26 20:39:11 +01:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lyrathorpe/music-curator#15