Fixed rich presence not showing on file without metadata

This commit is contained in:
Ryze 2023-02-07 01:17:55 +03:00
parent 17894eecaf
commit 7901e24bf9

View file

@ -120,6 +120,11 @@ impl DiscordClient {
if let Some(album) = &metadata.album { if let Some(album) = &metadata.album {
state += &format!(" on {album}"); state += &format!(" on {album}");
} }
if state.is_empty() {
state = String::from("File");
}
utils::truncate_string_fmt(&mut state, MAX_STR_LEN); utils::truncate_string_fmt(&mut state, MAX_STR_LEN);
state state
} }