diff options
author | Archer <chaseandbuster@gmail.com> | 2023-09-12 17:11:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-12 23:11:25 +0200 |
commit | a95311ef2cb4f22bd554de97a7b635b3e9d4de06 (patch) | |
tree | ae9500c21995a6f28ba283b365f55fa3b970d3de /src | |
parent | dd23f9802c6cd1c30256fe5916eaba742980691f (diff) | |
download | Vencord-a95311ef2cb4f22bd554de97a7b635b3e9d4de06.tar.gz Vencord-a95311ef2cb4f22bd554de97a7b635b3e9d4de06.tar.bz2 Vencord-a95311ef2cb4f22bd554de97a7b635b3e9d4de06.zip |
lastfm: Add setting for artist name and song title only (#1726)
Co-authored-by: V <vendicated@riseup.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lastfm.tsx | 16 | ||||
-rw-r--r-- | src/utils/constants.ts | 4 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/plugins/lastfm.tsx b/src/plugins/lastfm.tsx index 66be06a..7a42f8f 100644 --- a/src/plugins/lastfm.tsx +++ b/src/plugins/lastfm.tsx @@ -76,6 +76,8 @@ const enum NameFormat { StatusName = "status-name", ArtistFirst = "artist-first", SongFirst = "song-first", + ArtistOnly = "artist", + SongOnly = "song" } const applicationId = "1108588077900898414"; @@ -143,6 +145,14 @@ const settings = definePluginSettings({ { label: "Use format 'song - artist'", value: NameFormat.SongFirst + }, + { + label: "Use artist name only", + value: NameFormat.ArtistOnly + }, + { + label: "Use song name only", + value: NameFormat.SongOnly } ], }, @@ -171,7 +181,7 @@ const settings = definePluginSettings({ export default definePlugin({ name: "LastFMRichPresence", description: "Little plugin for Last.fm rich presence", - authors: [Devs.dzshn, Devs.RuiNtD, Devs.blahajZip], + authors: [Devs.dzshn, Devs.RuiNtD, Devs.blahajZip, Devs.archeruwu], settingsAboutComponent: () => ( <> @@ -298,6 +308,10 @@ export default definePlugin({ return trackData.artist + " - " + trackData.name; case NameFormat.SongFirst: return trackData.name + " - " + trackData.artist; + case NameFormat.ArtistOnly: + return trackData.artist; + case NameFormat.SongOnly: + return trackData.name; default: return settings.store.statusName; } diff --git a/src/utils/constants.ts b/src/utils/constants.ts index 424c9aa..cd6a7a2 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -370,6 +370,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({ blahajZip: { name: "blahaj.zip", id: 683954422241427471n, + }, + archeruwu: { + name: "archer_uwu", + id: 160068695383736320n } } satisfies Record<string, Dev>); |