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

fix: search issue, don't index before processed

+18 -4
+2 -1
src/components/input/ephemeral-cache/worker.js
··· 83 83 * @type {Actions['resolve']} 84 84 */ 85 85 export async function resolve({ uri }) { 86 - const blob = /** @type {Blob | undefined} */ (await IDB.get(CACHE_KEY_PREFIX + uri)); 86 + const blob = 87 + /** @type {Blob | undefined} */ (await IDB.get(CACHE_KEY_PREFIX + uri)); 87 88 if (!blob) return undefined; 88 89 89 90 let blobUrl = blobUrls.get(uri);
+15 -3
src/components/orchestrator/scoped-tracks/element.js
··· 54 54 #disabledSources = computed(() => { 55 55 const col = this.#output.value?.settings.collection(); 56 56 if (!col || col.state !== "loaded") return []; 57 - const setting = col.data.find((s) => s.key === "sh.diffuse.input.disabled.uris"); 57 + 58 + const setting = col.data.find((s) => 59 + s.key === "sh.diffuse.input.disabled.uris" 60 + ); 61 + 58 62 if (!setting) return []; 63 + 59 64 try { 60 65 const parsed = JSON.parse(setting.value); 61 66 return Array.isArray(parsed) ? /** @type {string[]} */ (parsed) : []; ··· 158 163 // Watch tracks collection 159 164 this.effect(async () => { 160 165 const tracksCol = output.tracks.collection(); 166 + 161 167 if ((await this.isLeader()) === false) return; 162 168 if (tracksCol.state !== "loaded") return; 163 169 ··· 169 175 }); 170 176 171 177 // Consult inputs 172 - const groups = tracksCol.data.length ? await input.groupConsult(uris) : {}; 178 + const groups = tracksCol.data.length 179 + ? await input.groupConsult(uris) 180 + : {}; 173 181 174 182 /** @type {Set<string>} */ 175 183 const availableUris = new Set(); ··· 246 254 247 255 const cmp = typeof aVal === "string" && typeof bVal === "string" 248 256 ? aVal.localeCompare(bVal) 249 - : aVal < bVal ? -1 : aVal > bVal ? 1 : 0; 257 + : aVal < bVal 258 + ? -1 259 + : aVal > bVal 260 + ? 1 261 + : 0; 250 262 251 263 if (cmp !== 0) return cmp * dir; 252 264 }
+1
src/components/orchestrator/scoped-tracks/worker.js
··· 66 66 const tracksMap = new Map(); 67 67 68 68 for (const track of tracks) { 69 + if (!track.tags) return; 69 70 tracksMap.set(track.id, track); 70 71 } 71 72