jpochyla / psst

Fast and multi-platform Spotify client with native GUI
MIT License
8.56k stars 219 forks source link

Add ability to add to queue #471

Closed SO9010 closed 5 months ago

SO9010 commented 6 months ago

This adds the ability to right-click on a song and add it to play next in the queue. Please do leave me feedback and critiques as this is my first time programming in rust!

Solves #431 !

jacksongoode commented 6 months ago

This looks good but it sure would be nice to see the queue as a view. I'm wondering how difficult it would be to create a list page for a view of this queue? I could see us merging this feature before that, but it would feel incomplete... @Insprill what do you think?

SO9010 commented 6 months ago

I just realised that the queue isn't held when switching to another playlist or clicking on another song to play now so I will quickly fix that.

SO9010 commented 6 months ago

It will take me a decent amount of time to get it so it can keep the queued song so it can be played next in a playlist the song isn't in.

SO9010 commented 6 months ago

Okay, so I have added some updates to my code, the added queue is added to a new vector which means it can be held in place, additionally it means that I used the push_back method meaning that it doesn't make it play next, rather more like the official client it adds at the end of a user created queue... I hope that makes sense, but it is a lot better now.

jacksongoode commented 6 months ago

Really excited to have a look at this today @SO9010 !

jacksongoode commented 5 months ago

It seems like queuing, switching contexts (to a different playlist or album) and then adding again to the queue causes past queued items to disappear. Is this not the case in your behavior?

SO9010 commented 5 months ago

Hello, sorry this was an oversight! I assumed that the user would want to have the queue reset when they change the playlist. But that would be counter-intuitive. I have fixed this issue.

I'm sorry if this is very time-consuming for you, I'm still pretty new to open-source contribution.

jacksongoode commented 5 months ago

I just tested this out and it feels right to me! Looking over the code now!

SO9010 commented 5 months ago

Thank you so much!!!!