aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/event/handler.rs11
1 files changed, 11 insertions, 0 deletions
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)?;
}