Skip to content
This repository has been archived by the owner on Feb 19, 2023. It is now read-only.

Shuffle and queue buttons mess up the song playing #98

Closed
squivix opened this issue Jul 15, 2021 · 12 comments · Fixed by #101, #102, #104 or #105
Closed

Shuffle and queue buttons mess up the song playing #98

squivix opened this issue Jul 15, 2021 · 12 comments · Fixed by #101, #102, #104 or #105
Labels
bug Something isn't working

Comments

@squivix
Copy link
Collaborator

squivix commented Jul 15, 2021

Describe the bug
Pressing the shuffle button and show queue button a few times seems to make the app show the wrong song playing.

To Reproduce
Steps to reproduce the behavior:

  1. Click on a song to play
  2. Press the shuffle button
  3. Press the queue button
  4. Repeat 2 and 3 until title shows wrong song

Expected behavior
Shuffling the queue should not affect the song playing, only the rest of the queue.

@squivix squivix changed the title Scuffle and queue buttons mess up the song playing Shuffle and queue buttons mess up the song playing Jul 15, 2021
@Benji377 Benji377 added the bug Something isn't working label Jul 15, 2021
@Benji377 Benji377 added this to To Do in Exceptions and Bugs via automation Jul 15, 2021
@Benji377
Copy link
Owner

Hm... yeah I saw. But if you look at the code to generate the random queue, the first song of the queue is picked from the currently playing song and is added immediately and therefore skipped. If you click on the button again, the queue gets reset.

Benji377 added a commit that referenced this issue Jul 16, 2021
The bug should now hopefully be fixed. I will test it on my phone too, but it should be ok.
I also had to remake the playlist class as I just found out that the Mediastore playlist class is deprecated and should not be used. They suggest using M3U-files instead so that's what I am going for now.
@Benji377 Benji377 linked a pull request Jul 16, 2021 that will close this issue
Exceptions and Bugs automation moved this from To Do to Done Jul 16, 2021
Benji377 added a commit that referenced this issue Jul 16, 2021
Fixed bug #98 and playlist refactoring
@Benji377
Copy link
Owner

Ok nope. This is not solved. I managed to make the app crash now. Working on it

@Benji377 Benji377 reopened this Jul 16, 2021
Exceptions and Bugs automation moved this from Done to To Do Jul 16, 2021
squivix pushed a commit to squivix/SocyMusic that referenced this issue Jul 16, 2021
squivix pushed a commit to squivix/SocyMusic that referenced this issue Jul 16, 2021
@squivix
Copy link
Collaborator Author

squivix commented Jul 16, 2021

Ok should be fixed now. Reverting to the original queue means having to keep track of the original queue all the time.

@Benji377
Copy link
Owner

Strangely it was working on the emulator, but as soon as I switched to my phone it broke. But yeah I realized the issue almost at the same time as you hahah.

Benji377 added a commit that referenced this issue Jul 16, 2021
Fixed issue #98 and removed some TODOs and some old code.
@Benji377 Benji377 linked a pull request Jul 16, 2021 that will close this issue
@Benji377
Copy link
Owner

Further testing is required xD

@squivix
Copy link
Collaborator Author

squivix commented Jul 16, 2021

Further testing is required xD

Always :P

@Benji377
Copy link
Owner

And I found another issue hahhah. If you try this while using the first song in queue, everything is fine. But as soon as you go to the next song and try it there it changes the title again.
This might get fixed by keeping track of what sog is currently playing and not changing it.

squivix pushed a commit to squivix/SocyMusic that referenced this issue Jul 16, 2021
@squivix
Copy link
Collaborator Author

squivix commented Jul 16, 2021

Ok latest PR sets the playing index to 0 when shuffling and resets it back to what it was when un-shuffling.

Benji377 added a commit that referenced this issue Jul 16, 2021
Another attempt at issue #98 and some renaming.
@Benji377 Benji377 linked a pull request Jul 16, 2021 that will close this issue
@Benji377
Copy link
Owner

And let's test it again and pray. Because I am tired and want to sleep xD

@Benji377
Copy link
Owner

Guess who found another problem with it? Yep...me. If you press the next button and then press the previous button it doesn't actually return to the previous song as it should, but actually just picks a random song. Then if you click on the shuffle button again and look at the queue the title gets reset.

@Benji377 Benji377 moved this from To Do to In progress in Exceptions and Bugs Jul 16, 2021
squivix pushed a commit to squivix/SocyMusic that referenced this issue Jul 16, 2021
@squivix
Copy link
Collaborator Author

squivix commented Jul 16, 2021

Wow this is a persistent bug, or maybe I'm just not very good at testing XD

I hope this one fixes it but if not we'll leave it for tomorrow

Benji377 added a commit that referenced this issue Jul 17, 2021
Yet another attempt at solving issue #98
@Benji377 Benji377 linked a pull request Jul 17, 2021 that will close this issue
@Benji377
Copy link
Owner

Tested and it works now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.