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: 🧹

+8 -6
+1 -1
src/common/worker.js
··· 65 65 * @param {Track[]} tracks 66 66 */ 67 67 export function tracksOut(tracks) { 68 - const buffer = new TextEncoder().encode(JSON.stringify(tracks)) 68 + const buffer = new TextEncoder().encode(JSON.stringify(tracks)); 69 69 return transfer(buffer, [buffer]); 70 70 } 71 71
+2
src/common/worker/rpc.js
··· 113 113 } 114 114 } 115 115 116 + console.log(message) 117 + 116 118 this.#realm().postMessage( 117 119 message.data, 118 120 /** @type {Transferable[]} */ (message.transfers),
+1 -1
src/components/orchestrator/scoped-tracks/element.js
··· 122 122 const collection = output.tracks.collection(); 123 123 console.log("🫠", collection); 124 124 if ((await this.isLeader()) === false) return; 125 - const { availableTracks } = await this.#proxy.supplyAvailable(collection); 125 + const { availableTracks } = await this.#proxy.supply(collection); 126 126 this.#tracksAvailable.value = availableTracks; 127 127 }); 128 128
+1 -1
src/components/orchestrator/scoped-tracks/types.d.ts
··· 8 8 args: { tracks: Track[]; playlist: Playlist }, 9 9 ): Promise<Track[]>; 10 10 searchTracks(params: SearchParams<Schema>): Promise<Track[]>; 11 - supplyAvailable(tracks: Track[]): Promise<{ availableTracks: Track[] }>; 11 + supply(tracks: Track[]): Promise<{ availableTracks: Track[] }>; 12 12 };
+3 -3
src/components/orchestrator/scoped-tracks/worker.js
··· 14 14 //////////////////////////////////////////// 15 15 16 16 /** 17 - * @type {ActionsWithTunnel<Actions>["supplyAvailable"]} 17 + * @type {ActionsWithTunnel<Actions>["supply"]} 18 18 */ 19 - export async function supplyAvailable({ data, ports }) { 19 + export async function supply({ data, ports }) { 20 20 const cachedTracks = data.filter((t) => t.kind !== "placeholder"); 21 21 22 22 /** @type {ProxiedActions<InputActions>} */ ··· 73 73 //////////////////////////////////////////// 74 74 75 75 ostiary((context) => { 76 - rpc(context, { filterByPlaylist, searchTracks, supplyAvailable }); 76 + rpc(context, { filterByPlaylist, searchTracks, supply }); 77 77 });