VersionControl:PRs/rabbithole/12: Difference between revisions
From PickiPedia: A knowledge base of bluegrass, old time psychedelic jams, and other public domain music
Jump to navigationJump to search
cryptograss/rabbithole#12, as GitHub has it |
cryptograss/rabbithole#12, as GitHub has it |
||
| Line 16: | Line 16: | ||
|deploy=redeploy pickipedia. | |deploy=redeploy pickipedia. | ||
}} | }} | ||
<pre class="pr-body">Item 1 of the [player audit](https://pickipedia.xyz/wiki/26350517_Rabbithole_player_audit): a song that ended never played the next one. Track end was guessed from the clock and a `length` field Webamp's media state does not have, so trails and add-to-queue lined songs up that nothing ever reached. | |||
**Invariant:** when a song ends, the next queued song plays. **By construction:** the queue *is* Webamp's playlist. `enqueue(song)` appends to it; Webamp moves on by itself on `ended`, as a playlist does; the player watches Webamp's current track and shows the song it belongs to, and tells the shell (`onSongChange`) so title, cover, URL and card clicks catch up. The shell keeps no queue of its own, and `playNextInRabbithole` is gone. An "Up next" line under the title reads the playlist back (`onQueueChange`). | |||
Every track handed to Webamp now carries its title as `metaData`, so Webamp reads no ID3 tags out of the file: no second fetch of the audio from IPFS, and the "Cannot cancel a locked stream" console errors are gone with it. | |||
**Found on the way:** `openWikiPage` wired the pane's links twice (once inside `wirePaneChrome`, once after it) since 18 Oct. One click on a pane Listen button loaded its song twice, 20ms apart. That is the pair of loads behind Skyler's doubled cards; #9 made a double load harmless, this removes the double. One click on a trail queued it twice, too. Wired once now, and `enqueue` lines a song up once however often it is asked. | |||
**Checked on pickipedia.xyz with the branch routed in:** trail from Swords to Victory queues Victory once and "Up next: Victory" shows; a second trail click doesn't double it; seeking Swords to 3s before its end and letting it play, Victory came on by itself 2.8s later with its six cards, the header, and the URL following; a pane Listen click now runs its handler once (was twice). 7 new tests, 96 pass. | |||
Left alone, on purpose: the autoplay guard in `loadNewSong` (audit item 8) and the editor not following a song the playlist advanced to, which it already didn't for a pane Listen click. | |||
Deploy: redeploy pickipedia. | |||
Worked on by: magent, with Skyler and Justin, in #rabbithole</pre> | |||
Latest revision as of 19:06, 9 November 2026
| State | 🟣 merged 2026-11-06 17:09:21 |
|---|---|
| Worked on by | magent, with skyler, justin |
| Moods | #rabbithole |
| Deploy | redeploy pickipedia. |
| Branch | feat/queue-is-the-playlist → main, by magent-cryptograss
|
| Opened · last pushed | 2026-11-05 20:52:12 · 2026-11-05 20:51:57 |
Item 1 of the [player audit](https://pickipedia.xyz/wiki/26350517_Rabbithole_player_audit): a song that ended never played the next one. Track end was guessed from the clock and a `length` field Webamp's media state does not have, so trails and add-to-queue lined songs up that nothing ever reached. **Invariant:** when a song ends, the next queued song plays. **By construction:** the queue *is* Webamp's playlist. `enqueue(song)` appends to it; Webamp moves on by itself on `ended`, as a playlist does; the player watches Webamp's current track and shows the song it belongs to, and tells the shell (`onSongChange`) so title, cover, URL and card clicks catch up. The shell keeps no queue of its own, and `playNextInRabbithole` is gone. An "Up next" line under the title reads the playlist back (`onQueueChange`). Every track handed to Webamp now carries its title as `metaData`, so Webamp reads no ID3 tags out of the file: no second fetch of the audio from IPFS, and the "Cannot cancel a locked stream" console errors are gone with it. **Found on the way:** `openWikiPage` wired the pane's links twice (once inside `wirePaneChrome`, once after it) since 18 Oct. One click on a pane Listen button loaded its song twice, 20ms apart. That is the pair of loads behind Skyler's doubled cards; #9 made a double load harmless, this removes the double. One click on a trail queued it twice, too. Wired once now, and `enqueue` lines a song up once however often it is asked. **Checked on pickipedia.xyz with the branch routed in:** trail from Swords to Victory queues Victory once and "Up next: Victory" shows; a second trail click doesn't double it; seeking Swords to 3s before its end and letting it play, Victory came on by itself 2.8s later with its six cards, the header, and the URL following; a pane Listen click now runs its handler once (was twice). 7 new tests, 96 pass. Left alone, on purpose: the autoplay guard in `loadNewSong` (audit item 8) and the editor not following a song the playlist advanced to, which it already didn't for a pane Listen click. Deploy: redeploy pickipedia. Worked on by: magent, with Skyler and Justin, in #rabbithole