From 7901e24bf905dbbc404e4ad80cbeb069c9e30f14 Mon Sep 17 00:00:00 2001 From: Ryze Date: Tue, 7 Feb 2023 01:17:55 +0300 Subject: [PATCH] Fixed rich presence not showing on file without metadata --- src/discord_client.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/discord_client.rs b/src/discord_client.rs index d290a1b..df6eb38 100644 --- a/src/discord_client.rs +++ b/src/discord_client.rs @@ -120,6 +120,11 @@ impl DiscordClient { if let Some(album) = &metadata.album { state += &format!(" on {album}"); } + + if state.is_empty() { + state = String::from("File"); + } + utils::truncate_string_fmt(&mut state, MAX_STR_LEN); state }