Skip to content

Conversation

@Chaphasilor
Copy link
Collaborator

@Chaphasilor Chaphasilor commented Nov 26, 2025

Changes

Various fixes to close a few more issues with the next release...

Todo before merging

  • Fix contrast issues on current track tile
  • Unhide "Max Concurrent Downloads" setting on iOS since it's actually being used now
  • Fix MediaSources assertion error Seems to indeed be related to download errors and not a fluke
    • Might be related to deleted FinampSettings
  • Remove shuffle disabled on desktop string (desktopShuffleWarning)
  • Check if similar radio really is unavailable after starting a single track (and it stopping at the end)
    • Didn't work on watch, continuous was available
  • Add setting to force audio offloading
    • This is now disabled (for compatibility) by default in just_audio 0.10 but could help with reducing battery drain
  • Opt in to Impeller again
    • Opt-out is now deprecated, so it should be stable enough and offer some performance benefits for newer devices
  • Fix album mix mode running out of tracks
  • Open radio source when tapping source on player screen
  • Make album mix mode the third mode
  • Generate much fewer tracks when starting new queue via radio
    • Especially continuous mode takes a while to generate 30 tracks
  • Increase hitbox of back button on player screen
  • Try to increase maximum width for titles
  • Check if reordering with shuffle active can be enabled now
    • Nope, still broken. Updating the _shuffleOrder doesn't persist, and using _player.moveAudioSource() seems to overwrite indices, so that un-shuffling isn't possible anymore
  • Shrink scroll-to-current FAB on lyrics and queue screens
  • Fix special download collections showing as "Unlocalized ..."
  • Use consistent height for track titles of one and two lines
  • Fix don't sync on startup setting not applying
    • The observed behavior stems from restartDownloads getting called when opening the downloads screen, so unless that happens downloads don't sync on startup
    • Maybe it would make sense to only actually restart downloads if they were started before, and otherwise wait for resync to be called?
  • Fix contrast for word-by-word lyrics
  • Fix favorite state in notification not being in sync
    • Possibly because the metadata was fetched later, and then the notification wasn't updated?
  • Add Instant Mix for all types to release notes
  • Remember the current fallback mode for the album mix across generation
    • Otherwise we make a ton of pointless requests
    • Only reset when the radio source changes
  • Try to hook up audio session to system equalizer Will have to wait for another PR
  • Translations
  • Reset Settings
  • Test upgrading from 0.9.20 before merging

Related Issues

@Chaphasilor Chaphasilor linked an issue Nov 26, 2025 that may be closed by this pull request
@Chaphasilor Chaphasilor linked an issue Nov 26, 2025 that may be closed by this pull request
@Chaphasilor Chaphasilor mentioned this pull request Nov 30, 2025
3 tasks
@Chaphasilor Chaphasilor linked an issue Dec 2, 2025 that may be closed by this pull request
14 tasks
Chaphasilor and others added 16 commits December 4, 2025 22:43
…ack action row. Prevent use of -1 as initial row position.
- still makes excessive requests, but at least it doesn't break anymore
- this is disabled by default because of known incorrect negotiations between ExoPlayer and the device, so we default to off:
  > IMPORTANT: activation of audio offload depends on a negotiation between ExoPlayer and the device to determine whether offload can be supported for a given format and with given constraints (gapless, speed change). However, several instances have been reported where the device incorrectly confirms support for audio offload when it doesn't, and this can result in buggy audio playback. Therefore, it is advised that you programmatically enable audio offload only on device/OS combinations that you have tested and verified to work.
  (from https://pub.dev/documentation/just_audio/latest/just_audio/AndroidAudioOffloadPreferences-class.html)
- even if enabled, we only actually offload if both gapless and speed control are (supposedly) available, for full compatibility
the first three modes now source new tracks, while the other modes "recycle" tracks from the source or current queue
…properly on stop if radio is enabled (and cache is filled)
@Komodo5197
Copy link
Collaborator

I noticed your note about rearanging tracks while shuffled. Can't you just use the same trick as the restore, where you override our shuffle order with updated indices and then call shuffle? Does player fail to apply the update or something?

@Chaphasilor
Copy link
Collaborator Author

You're right, overwriting the shuffleIndices does work. I just wasn't familiar with how it worked exactly and didn't give it a try. Thanks for pointing that out!

Also, I'm not entirely sure if the fallbackMode caching I've added is to your taste, so you might wanna take a look at that.
I'm planning to do a final round of testing tomorrow over the entire day, and then merge this, unless there are issues of course.
I'll probably try to throw in the system equalizer change if I can get it to work.

} finally {
if (localRadioState?.isStillValid() ?? false) {
_radioCacheStateStream.add(localRadioState?.copyWith(fallbackMode: fallbackMode));
if (localRadioState != null && identical(localRadioState, _radioCacheStateStream.valueOrNull)) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be updating the localRadioState if we have an overrideSeed. But if we don't, we should be able to call .updateAlbumMixFallbackMode unconditionally.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that would mean that if we end up in a fallback for the initial queue generation (which could happen e.g. if the user only has singles by that artist), then we'd "forget" about that and only remember the fallback for the next scheduled fetch of radio tracks? Nothing terrible of course.
But I guess that won't work anyway since we're invalidating the cache after generating the initial queue track in startRadioPlayback()

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I don't think there's a way we could persist the fallback mode from new radio queues without just returning the fallback mode and letting the caller handle persisting, because the new queue cache state isn't fully set up early enough. Doing this would complicate the interface, but it would also let the album fallback persisting be cleanly handled along with the generation lock and would get all cache state back out of generateTracks(). Probably not worthwhile?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's see how the requirements for radio (new modes, etc.) develop based on feedback, and then we can probably better judge which optimizations are worthwhile and which patterns we actually need to support.

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

Labels

None yet

Projects

None yet

3 participants