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

Add the option to shuffle playlists and swap the order of your songs. #139

Merged
merged 6 commits into from
Oct 2, 2024

Conversation

ysbrandB
Copy link
Member

@ysbrandB ysbrandB commented Sep 24, 2024

When adding a playlist you now get a modal that lets you choose if you want the playlist to be shuffled or not (see picture). It also informs non admins that only the first x songs get added. Fixes saproto/saproto#2218.
image

Also adds the option to swap videos that you have put in from position, and lets admins do that for other users.
This means if you have queue position 3 and 5 under the fair add system, you can press the up arrow on the song in position 3 or the down arrow in position 5 and than these two items will be swapped in the queue. See picture for the UI.

image

@ysbrandB
Copy link
Member Author

I have now tested this with an admin user and a non admin user at the same time and the permissions work as expected.

Copy link
Contributor

@Menkveld-24 Menkveld-24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
But it doesnt build for me (yet)
Scherm­afbeelding 2024-09-26 om 18 46 29

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesnt need to be vite right?

Comment on lines +96 to +97
}
if (up) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
if (up) {
} else {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice typescript!

};

const maxVideos = parseInt(
import.meta.env.VITE_USER_MAX_VIDEOS_IN_QUEUE ?? "20"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deze importeer je toch via een .env in de client map? En niet via de .env in de server map?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nee vite fixt dit automatisch voor je

@ysbrandB ysbrandB merged commit eda8051 into main Oct 2, 2024
2 checks passed
@ysbrandB ysbrandB deleted the feature/shuffle-playlist branch October 2, 2024 11:03
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.

Shuffle a youtube playlist when adding it to protube
3 participants