nukeop / nuclear

Streaming music player that finds free music for you
https://nuclear.js.org/
GNU Affero General Public License v3.0
11.72k stars 1.02k forks source link

Fixes issue mentioned in #1569. Unable to play file until app restart #1620

Closed CarlosBor closed 2 weeks ago

CarlosBor commented 2 weeks ago

I assumed it's not needed to make this an issue of its own but will do so if needed.

Basically, when trying to play recently added files to the queue the reducer for the local state expects an array of Track objects per a Typescript type assertion, this is important because the queue action tries to run find on this array. Problem is that when the tracks are first loaded they appear as an object with key-value pairs rather than an array:

image

This is a quick fix on that.

nukeop commented 2 weeks ago

Thanks, I'm going to merge this but also test this manually later because it might be platform-dependent. On Linux and Mac I was pretty sure this already was like this.