diff --git a/src/event/handler.rs b/src/event/handler.rs index 9d54ea9..d1f1146 100755 --- a/src/event/handler.rs +++ b/src/event/handler.rs @@ -130,6 +130,17 @@ pub fn handle_key_events(key_event: KeyEvent, app: &mut App) -> AppResult<()> { // Update MPD database KeyCode::Char('U') => { app.conn.conn.rescan()?; + + // Update the songs list + app.conn.songs_filenames = app + .conn + .conn + .listall() + .unwrap() + .into_iter() + .map(|x| x.file) + .collect(); + app.browser.update_directory(&mut app.conn)?; }