feat(ui): add gapless playback toggle button to player bar
Add a toggleable gapless button next to the repeat button in the NowPlayingBar. The setting persists in audio_settings.db and controls whether the audio thread pre-queues the next track for gapless transitions. Includes i18n keys for all 4 locales.
This commit is contained in:
1 parent
a21f7c7a93
commit
71bfb8dc17
9 files changed
+77
-7
No files matched your search
@@ -1997,8 +1997,14 @@ impl Player {
|
||||
}
|
||||
|
||||
// Gapless readiness: signal frontend when ~5s remain
|
||||
// Only when: playing, not streaming, no gapless already pending
|
||||
if dur > 0
|
||||
// Only when: playing, not streaming, no gapless already pending, gapless enabled
|
||||
let gapless_enabled = thread_settings
|
||||
.lock()
|
||||
.ok()
|
||||
.map(|s| s.gapless_enabled)
|
||||
.unwrap_or(false);
|
||||
if gapless_enabled
|
||||
&& dur > 0
|
||||
&& pos + 5 >= dur
|
||||
&& gapless_pending.is_none()
|
||||
&& !thread_state.is_gapless_ready()
|
||||
|
||||
Reference in new issue
Block a user