From dd3b7e534651bbe42fdd80b12c8b5815026760b7 Mon Sep 17 00:00:00 2001 From: KK2-5 <120592920+KK2-5@users.noreply.github.com> Date: Tue, 7 May 2024 22:55:32 -0300 Subject: [PATCH] LastfmRichPresence: Add option to use album name as status name (#2400) Co-authored-by: vee --- src/plugins/lastfm/index.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/plugins/lastfm/index.tsx b/src/plugins/lastfm/index.tsx index 5dfec8a3..1213ece2 100644 --- a/src/plugins/lastfm/index.tsx +++ b/src/plugins/lastfm/index.tsx @@ -77,7 +77,8 @@ const enum NameFormat { ArtistFirst = "artist-first", SongFirst = "song-first", ArtistOnly = "artist", - SongOnly = "song" + SongOnly = "song", + AlbumName = "album" } const applicationId = "1108588077900898414"; @@ -147,6 +148,10 @@ const settings = definePluginSettings({ { label: "Use song name only", value: NameFormat.SongOnly + }, + { + label: "Use album name (falls back to custom status text if song has no album)", + value: NameFormat.AlbumName } ], }, @@ -313,6 +318,8 @@ export default definePlugin({ return trackData.artist; case NameFormat.SongOnly: return trackData.name; + case NameFormat.AlbumName: + return trackData.album || settings.store.statusName; default: return settings.store.statusName; }