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