Fix: Add public reload_settings() method to Player
COMPILATION ERROR FIXED: - audio_settings field was private - Can't access from commands module SOLUTION: - Added public method: Player::reload_settings(settings) - Encapsulation preserved - Commands use public API VERIFIED: cargo check passes
This commit is contained in:
1 parent
e74c642831
commit
d5f2ec9030
2 files changed
+13
-4
No files matched your search
@@ -543,10 +543,8 @@ pub fn reinit_audio_device(
|
||||
// Reload settings from database to ensure Player has latest config (including backend_type)
|
||||
if let Ok(store) = audio_settings_state.store.lock() {
|
||||
if let Ok(fresh_settings) = store.get_settings() {
|
||||
if let Ok(mut player_settings) = state.player.audio_settings.lock() {
|
||||
*player_settings = fresh_settings;
|
||||
log::info!("Reloaded audio settings before reinit (backend_type: {:?})", player_settings.backend_type);
|
||||
}
|
||||
log::info!("Reloading audio settings before reinit (backend_type: {:?})", fresh_settings.backend_type);
|
||||
let _ = state.player.reload_settings(fresh_settings);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user