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

fix: scrobble selector attribute name + update element index

+10 -8
+1 -1
src/common/facets/foundation.js
··· 427 427 const sao = new ScrobbleAudioOrchestrator(); 428 428 sao.setAttribute("group", GROUP); 429 429 sao.setAttribute("audio-engine-selector", a.selector); 430 - sao.setAttribute("scrobbles-selector", sc.selector); 430 + sao.setAttribute("scrobble-selector", sc.selector); 431 431 432 432 return findExistingOrAdd(sao); 433 433 }
+4 -4
src/components/orchestrator/scrobble-audio/element.js
··· 34 34 this.audio = query(this, "audio-engine-selector"); 35 35 36 36 /** @type {ScrobbleElement} */ 37 - this.scrobbles = query(this, "scrobbles-selector"); 37 + this.scrobble = query(this, "scrobble-selector"); 38 38 39 39 await customElements.whenDefined(this.audio.localName); 40 - await customElements.whenDefined(this.scrobbles.localName); 40 + await customElements.whenDefined(this.scrobble.localName); 41 41 42 42 this.effect(() => this.#monitorAudio()); 43 43 } ··· 154 154 if (this.#trackId !== id || !this.#activeTrack) return; 155 155 156 156 try { 157 - await this.scrobbles?.nowPlaying(this.#activeTrack); 157 + await this.scrobble?.nowPlaying(this.#activeTrack); 158 158 } catch (err) { 159 159 console.warn("scrobble: nowPlaying failed", err); 160 160 } ··· 184 184 const startedAt = this.#startedAt; 185 185 186 186 try { 187 - await this.scrobbles?.scrobble(track, startedAt); 187 + await this.scrobble?.scrobble(track, startedAt); 188 188 } catch (err) { 189 189 console.warn("scrobble: scrobble failed", err); 190 190 this.#scrobbled = false;
+5 -3
src/index.vto
··· 23 23 - url: "components/configurator/scrobbles/element.js" 24 24 title: "Scrobbles" 25 25 desc: "Configure multiple scrobblers (music trackers)." 26 - todo: true 27 26 28 27 engines: 29 28 - url: "components/engine/audio/element.js" ··· 100 99 - url: "components/orchestrator/queue-audio/element.js" 101 100 title: "Queue ⭤ Audio" 102 101 desc: "Connects the given queue engine to the given audio engine." 102 + - url: "components/orchestrator/scrobble-audio/element.js" 103 + title: "Scrobble ⭤ Audio" 104 + desc: "Connects the audio engine with a scrobbler element. Calls `nowPlaying` when a track starts playing and `scrobble` once the user has listened long enough." 103 105 - url: "components/orchestrator/sources/element.js" 104 106 title: "Sources" 105 107 desc: "Monitor tracks from the given output to form a list of sources based on the input's sources return value." ··· 132 134 desc: "Provides a way to search through a collection of tracks, powered by orama.js" 133 135 134 136 supplements: 135 - - title: "Last.fm Scrobbler" 136 - todo: true 137 + - url: "components/supplement/last.fm/element.js" 138 + title: "Last.fm Scrobbler" 137 139 - title: "ListenBrainz Scrobbler" 138 140 todo: true 139 141 - title: "Rocksky Scrobbler"