OxygenCobalt / Auxio

A simple, rational music player for android
GNU General Public License v3.0
1.78k stars 117 forks source link

Fix Crashes/Bugs when Play Next is used at the end of a queue #748

Closed unrenowned closed 1 month ago

unrenowned commented 1 month ago

What is it?

Description of changes

Handles the case where the next item index is C.INDEX_UNSET, adding the songs to the end of the queue instead of crashing.

Also fixes another bug that I found during my testing: if Play Next is used at the end of an index when Repeat All is enabled, Auxio wraps around and puts the songs at the start of the queue instead of the end. This ends up breaking the view model/queue display, as shown in the video below:

https://github.com/OxygenCobalt/Auxio/assets/163776820/fad247be-6ba2-4879-9b20-ef1939e86a06

The new approach should always fetch the next song as if Repeat is disabled, so instead of wrapping around you will just get C.INDEX_UNSET and Auxio should proceed as above.

Fixes the following issues

735

APK testing

debug.zip

Due Diligence

OxygenCobalt commented 1 month ago

Thanks for these fixes! This looks good, so I'll merge.

P.S: Feel free to work on any outstanding feature requests as well. There's a lot of functionality that I need to implement, but I'm too busy currently with academics and other projects to do them.