update songs list on db update
This commit is contained in:
parent
51a3094d87
commit
1e02da68cc
|
|
@ -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)?;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in New Issue