-
Notifications
You must be signed in to change notification settings - Fork 133
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
[Redesign] Brand New Queuing System ✨ #484
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…bums - Implemented new QueueService for handling most of the queueing logic - Connected QueueService to MusicPlayerBackgroundTask for accessing the just_audio and audio_service queues - Forwarded playback events from just_audio to QueueService to keep track of current item - added new PlaybackList class for storing queue items + list meta info - display PlaybackList info on player screen
- Refactored `QueueService` with the proper state variables and functions - Linear & shuffled playback now working (for starting a new list, toggling doesn't work yet) - Adding to queue works - Manually skipping back and forth works - Skips initiated by the player also update the internal queues of the QueueService
- there's still a bug if the player skips to the next track by itself: if 'loop all' was enabled previously but then disabled, the player will still loop once - for more info see TODO at queue_service.dart:445
- needed to replace the concatenating audio source, because the player's index cannot be modified externally - this results in backwards loops not being gapless, oh well... - also fixed skipping backwards when 'loop one' is enabled (resets current track and adds entry to history)
- properly remove, prepend, and append AudioSources from/to the ConcatenatingAudioSource
- convert Streams to BehaviorSubjects - show current track and queue (needs fixing)
- allows efficient and flexible combination of multiple lists and elements into a single scrolling view
- can skip to track in both recent track and the regular queue by tapping on them
- some inconsistencies still happen, but it mostly works
- only thing missing is disabling shuffling and keeping the right index
- fixed adjustedQueueIndex being using the track index instead of the array index - fixed adjustedQueueIndex being based on shuffledIndices when shuffle disabled
- allows skipping using the QueueList again
- also move the accent color generation back into the player screen (for now) to fix an infinite loop
- makes it easier to "like" a song that you just listened to
@AhegaHOE I just fixed all the overflow issues I could find. Let me know if I missed anything! |
- why is this so hard? :((
@Chaphasilor thank you. I'll take a look at it soon! |
I've discussed it with Chaphasilor, and it looks like we can finally merge this :) |
Holy. I thought the day would never come 😂😁 Thanks to everyone who tested and commented this! I'll try to get this to a beta level asap! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I can't believe this is finally in a state where I feel like we can think about getting this merged in.
It was an absolute pain to implement this, and I'm barely happy with the end result, but it should be (much) better than the old queueing system, both functionality and design-wise.
Here's a quick break down:
QueueService
for managing everything queue-relatedScreenshots
TODOs
minBufferDuration
is smaller thanmaxBufferDuration
Implement light mode (once designed and contrast bug has been fixed)- out of scopeSupport playing next X songs (depending on settings) of songs tab, in current sorting order (recently added, artist, rating)- out of scopeAdd customization options- out of scopeshoutout to @rom4nik, thanks a ton! <3