up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user