This commit is contained in:
2026-10-18 05:25:23 +07:00
parent f5e645ec00
commit 30999630f0
18 changed files with 1023 additions and 185 deletions
+5 -1
View File
@@ -144,7 +144,7 @@ function initialChannel(): ChannelState {
status: 'idle',
position: 0,
duration: null,
volume: 35,
volume: 100,
error: '',
playlistId: null,
trackIndex: 0,
@@ -268,6 +268,10 @@ export class Controller {
if (preserve && catalog.key === this.state.catalog.key) {
catalog.cover = this.state.catalog.cover
catalog.background = this.state.catalog.background
const music = this.state.channels.music
const tracks = catalog.playlists.find((p) => p.id === music.playlistId)?.tracks
const index = tracks?.findIndex((t) => t.source.url === music.source?.url) ?? -1
if (index >= 0) music.trackIndex = index
this.state.catalog = catalog
this.broadcast()
return