A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: clear some todos

+25 -11
+1
src/components/engine/queue/element.js
··· 25 25 this.proxy = this.workerProxy(); 26 26 27 27 this.add = this.proxy.add; 28 + this.clear = this.proxy.clear; 28 29 this.fill = this.proxy.fill; 29 30 this.shift = this.proxy.shift; 30 31 this.supply = this.proxy.supply;
+4
src/components/engine/queue/types.d.ts
··· 3 3 4 4 export type Actions = { 5 5 add: (args: { inFront?: boolean; tracks: Track[] }) => void; 6 + /** 7 + * Clear the `future()` items. 8 + */ 9 + clear: (args: { manualOnly?: boolean }) => void; 6 10 fill: ( 7 11 args: { 8 12 /** Always keep adding, even if the amount of non-manual items in the queue are passed the given `amount` */
+10
src/components/engine/queue/worker.js
··· 39 39 } 40 40 41 41 /** 42 + * @type {Actions['clear']} 43 + */ 44 + export function clear({ manualOnly }) { 45 + $future.value = manualOnly 46 + ? $future.value.filter((i) => i.manualEntry === true) 47 + : []; 48 + } 49 + 50 + /** 42 51 * @type {Actions['fill']} 43 52 */ 44 53 export function fill({ augment, amount, shuffled }) { ··· 90 99 91 100 rpc(context, { 92 101 add, 102 + clear, 93 103 fill, 94 104 shift, 95 105 supply,
-4
src/components/input/opensubsonic/worker.js
··· 260 260 const songId = parsed.songId; 261 261 if (!songId) return undefined; 262 262 263 - // TODO: 264 - // const expiresInSeconds = 60 * 60 * 24 * 7; // 7 days 265 - // const expiresAtSeconds = Math.round(Date.now() / 1000) + expiresInSeconds; 266 - 267 263 const url = await client 268 264 .stream({ 269 265 id: songId,
+10 -3
src/components/orchestrator/auto-queue/element.js
··· 87 87 }); 88 88 89 89 // Automatically fill queue 90 + let lastShuffle = repeatShuffle.shuffle(); 91 + 90 92 this.effect(() => { 91 93 const trigger = queue.now(); 92 94 const _other_trigger = queue.supplyFingerprint(); 95 + const shuffled = repeatShuffle.shuffle(); 93 96 94 97 this.isLeader().then((isLeader) => { 95 98 if (!isLeader) return; 96 99 100 + // Clear non-manual items from the queue 101 + // when 'shuffle' gets turned off or on. 102 + if (shuffled !== lastShuffle) { 103 + lastShuffle = shuffled; 104 + queue.clear({ manualOnly: true }); 105 + } 106 + 97 107 queue.fill({ amount: 10, shuffled: repeatShuffle.shuffle() }); 98 108 99 109 // Insert now-playing track if there's none 100 110 if (!trigger) queue.shift(); 101 111 }); 102 112 }); 103 - 104 - // TODO: Clear non-manual items from the queue 105 - // when 'shuffle' gets turned off or on. 106 113 } 107 114 108 115 // WORKERS
-4
src/themes/blur/index.css
··· 18 18 height: 100dvh; 19 19 overflow: hidden; 20 20 padding: var(--space-md) var(--space-md); 21 - 22 - /* TODO: & iframe { 23 - border-radius: 6px; 24 - }*/ 25 21 } 26 22 27 23 /***********************************