Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tracks loaded through updatePlaylist are reversed #119

Open
oskarrough opened this issue Jul 29, 2018 · 1 comment
Open

Tracks loaded through updatePlaylist are reversed #119

oskarrough opened this issue Jul 29, 2018 · 1 comment
Labels

Comments

@oskarrough
Copy link
Member

Whenever tracks are loaded into the player, we reverse the ordering.

This makes sense for Radio4000 channels as we want the newest track (e.g. last) rendered first in the list. But it does not make sense when you load something that isn't a Radio4000 channel, like local files. There you expect it to have whichever order you pass in.

The reverse is here: https://github.com/internet4000/radio4000-player/blob/master/src/Radio4000Player.vue#L171

And we also sort tracks fetched from R4 API here: https://github.com/internet4000/radio4000-player/blob/master/src/utils/store.js#L44

Not sure we do both but if we can ensure the reversing is only done for R4 channels and not when set through updatePlaylist() we should be good.

@oskarrough
Copy link
Member Author

@hugurp what do you think? Seems counter intuitive that the order is reversed with updatePlaylist().

I'd propose we move the [].reverse() to where we fetch data from the API. This way it wouldn't affect tracks added through a playlist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant