diff --git a/CHANGELOG.md b/CHANGELOG.md index d88fbe5..9af274f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Playlist retrieval crashing when list contains podcast episodes - Crash when shifting a song by an amount greater than the queue's length +- Crash when displaying songs that do not have an (available) artist ## [1.3.1] diff --git a/src/model/playable.rs b/src/model/playable.rs index 72cf2c3..71bd5fb 100644 --- a/src/model/playable.rs +++ b/src/model/playable.rs @@ -38,7 +38,9 @@ impl Playable { .replace( "%artist", if let Some(artists) = playable.artists() { - artists.first().unwrap().clone().name + artists + .first() + .map_or(String::from(""), |artist| artist.name.clone()) } else { String::new() }