mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 23:02:43 +01:00
Bugfix/large playlist crash (#111)
* get all song coverArt as they are rendered doing it all up front was too heavy temporarily disabled mapping artwork in setQueue, need to fix this * use cache data for track artwork when available * fix round art in context menu for songs * set only the first artwork at play time then set the rest in the playback service * handle both cached images and fetching images * remove commented code * fix shuffle fix first thumbnail not being updated on shuffle for now playing background
This commit is contained in:
@@ -55,6 +55,7 @@ export type TrackPlayerSlice = {
|
||||
setNetState: (netState: 'mobile' | 'wifi') => Promise<void>
|
||||
|
||||
rebuildQueue: (forcePlay?: boolean) => Promise<void>
|
||||
updateQueue: () => Promise<void>
|
||||
buildStreamUri: (id: string) => string
|
||||
resetTrackPlayerState: () => void
|
||||
|
||||
@@ -314,6 +315,17 @@ export const createTrackPlayerSlice = (set: SetStore, get: GetStore): TrackPlaye
|
||||
})
|
||||
},
|
||||
|
||||
updateQueue: async () => {
|
||||
const newQueue = await getQueue()
|
||||
const currentTrack = await getCurrentTrack()
|
||||
set(state => {
|
||||
state.queue = newQueue
|
||||
if (currentTrack !== undefined) {
|
||||
state.currentTrack = newQueue[currentTrack]
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
buildStreamUri: id => {
|
||||
const client = get().client
|
||||
if (!client) {
|
||||
|
||||
Reference in New Issue
Block a user