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

fix: collection order #569

Merged
merged 2 commits into from
Sep 6, 2023
Merged

Conversation

miraclx
Copy link
Owner

@miraclx miraclx commented Sep 6, 2023

JS objects have no guarantees of maintaining insertion order. The use of fromEntries to construct an object of numeric keys orders them numerically. Which is not what we want.

Fixes #568.

This is observable in the case of Apple Music, but even though we use the same logic for Spotify, their IDs are alphanumeric, so insertion order appears to be preserved. But we rewrite that section of code as well for correctness.

@github-actions
Copy link

github-actions bot commented Sep 6, 2023


🐋 🤖

A docker image for this PR has been built!

docker pull freyrcli/freyrjs-git:pr-569
Base (master)
This Patch


What's this?

This docker image is a self-contained sandbox that includes all the patches made in this PR. Allowing others to easily use your patches without waiting for it to get merged and released officially.

For more context, see https://github.com/miraclx/freyr-js#docker-development.

@miraclx miraclx changed the title fix(Apple Music): collection order fix: collection order Sep 6, 2023
@miraclx miraclx merged commit 0855665 into master Sep 6, 2023
18 checks passed
@miraclx miraclx deleted the miraclx/fix-applemusic-collection-order branch September 6, 2023 22:19
@miraclx miraclx mentioned this pull request Jan 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

.m3u8 playlist lists tracks in wrong order
1 participant