FreeTubeApp / FreeTube

An Open Source YouTube app for privacy
https://freetubeapp.io/
GNU Affero General Public License v3.0
13.66k stars 864 forks source link

[Feature Request]: Add Shuffle button within both YouTube and User Playlists #5618

Open aaronsql2019 opened 3 months ago

aaronsql2019 commented 3 months ago

Guidelines

Problem Description

In the 'Playlists' feature. I can click on a playlist and sort by many different options.

1. I clicked on 'Custom' in the sort by clause. I don't know what this is sorting by.

2. I'd LIKE to sort by RANDOM (so that every time I listen to this playlist, it is in a new order).

Proposed Solution

I'd like to be able to 'Sort By: Random' I have 103 songs in this playlist. I think that 10 songs are the same SONG but different ReMixes. I want to keep all the 'Duplicates' but I want to listen to them. I just don't want to sort alphabetically, because then I have 12 copies of the song 'IDGAF' (by Dua Lipa).

Again, I WANT to listen to all of these mixes. I just don't want to listen to them ONE RIGHT AFTER THE OTHER.

Alternatives Considered

As an alternative, if you could just explain what the 'Sort Order: Custom' does. This MIGHT already do what I want (but I think that it merely allows me to do a CUSTOM re-ordering of the songs (doing drag and drop).

Dua_Lipa_IDGAF_Sort_Order_20240827

Issue Labels

ease of use improvement

Additional Information

I started by taking a copy of THIS playlist. https://www.youtube.com/playlist?list=PLfqxLOyMxF2-c6P8d185EM4HcjgrYzAEl I clicked each song in the list to add it to my 'Default Playlist'. That generally works.

I just ALSO wish that there was an easier way to import a BUNCH of playlists to SQLITE. My PRIMARY FEATURE is to be able to access these playlists via SQLITE. I assume that I can do that (once I copy the playlist into FreeTube)?

I'll go test that feature soon. I'm beginning to use SQLITE for EVERYTHING!

KandiPanda commented 3 months ago

https://github.com/FreeTubeApp/FreeTube/issues/2. I'd LIKE to sort by RANDOM (so that every time I listen to this playlist, it is in a new order).

While it doesn't reorder the actual playlist itself, while playing a track in a playlist, selecting Shuffle (🔀) in the row of icons at the top of the list should make it play the entries in the current playlist in a random order. (If you're opening the playlist in an external player of some sort, most media players usually have a similar feature.)

image

aaronsql2019 commented 3 months ago

yeah, the only problem with THAT is that it always starts on the wrong song. I'll try to get by with that. Thanks.

absidue commented 3 months ago

I clicked on 'Custom' in the sort by clause. I don't know what this is sorting by.

That allows you to rearrange the videos in the playlist with the arrows on the video thumbnails, so custom doesn't do any sorting, it displays the real order of the items in the playlists.

absidue commented 3 months ago

I just ALSO wish that there was an easier way to import a BUNCH of playlists to SQLITE. My PRIMARY FEATURE is to be able to access these playlists via SQLITE. I assume that I can do that (once I copy the playlist into FreeTube)?

I'll go test that feature soon. I'm beginning to use SQLITE for EVERYTHING!

If you want to import and export to custom formats, you'll have to do that yourself. I suggest you write a tool for yourself that reads FreeTube's databases (they use the nedb database format) and writes to your sqlite database. This page tells you where you'll find the database files depending on your operating system: https://docs.freetubeapp.io/usage/data-location/

efb4f5ff-1298-471a-8973-3d47447115dc commented 3 months ago

yeah, the only problem with THAT is that it always starts on the wrong song

How can something start on a wrong song if you want it to be random?

aaronsql2019 commented 3 months ago

I just think that a single-click on the playlist should basically start playing it automatically. I think that it's a couple of clicks too many.

Click on playlist. Click on a song. Click on the Random Sort Button, then click the Play button? I LIKE your 'add to playlist' feature. I'm a TINY bit confused about the 'remove from playlist' feature.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 month ago

The only thing that would be an acceptable implementation is a shuffle button within the user playlist and if the user clicks on it the playlist it starts playing a random video and the shuffle button is enabled on the player page. This is how it works on other music/video players.

Sort by "Random" within the user Playlist is out of the question.

efb4f5ff-1298-471a-8973-3d47447115dc commented 1 month ago

The same functionality as YT would be enough

https://github.com/user-attachments/assets/ed851858-0b33-42c5-8026-6bf4dc77cae0

Edit: Maybe we should also add an Play All button to both YT playlists and User playlists?

JL0000 commented 2 weeks ago

I have been looking into this issue, I want to implement this

efb4f5ff-1298-471a-8973-3d47447115dc commented 2 weeks ago

@JL0000 Go for it!