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

Support smart shuffle #124

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Support smart shuffle #124

wants to merge 1 commit into from

Conversation

devgianlu
Copy link
Owner

This PR aims at adding support for Smart Shuffle. It is very early stages as some reverse engineering is required.

Spotify introduced the concept of signals and lenses. For Smart Shuffle we send a reset signal to the playlist with the enhance lense. The result is a list of ~310 tracks for a ~210 tracks playlist, but it is not clear where they should go. There is a suspicious metadata key called shuffle.distribution that may play a role in this. I have also noticed that the shuffle seed has been added to the session state.

There might be some refactoring required to handle the "injection" of tracks inside the current tracks list. Perhaps something similar to how the queue works?

@devgianlu devgianlu marked this pull request as draft October 13, 2024 17:49
@devgianlu devgianlu mentioned this pull request Oct 13, 2024
@SuisChan
Copy link

SuisChan commented Oct 13, 2024

The result is a list of ~310 tracks for a ~210 tracks playlist, but it is not clear where they should go. There is a suspicious metadata key called shuffle.distribution that may play a role in this.

According to my tests, signals returns a drop-in replacement playlist, where d(*) is the index in the queue by which tracks are played, every 10th is enhanced_recommendation, at least for me it is like that

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.

2 participants