lastfm: Add setting for artist name and song title only (#1726)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
dd23f9802c
commit
a95311ef2c
@ -76,6 +76,8 @@ const enum NameFormat {
|
|||||||
StatusName = "status-name",
|
StatusName = "status-name",
|
||||||
ArtistFirst = "artist-first",
|
ArtistFirst = "artist-first",
|
||||||
SongFirst = "song-first",
|
SongFirst = "song-first",
|
||||||
|
ArtistOnly = "artist",
|
||||||
|
SongOnly = "song"
|
||||||
}
|
}
|
||||||
|
|
||||||
const applicationId = "1108588077900898414";
|
const applicationId = "1108588077900898414";
|
||||||
@ -143,6 +145,14 @@ const settings = definePluginSettings({
|
|||||||
{
|
{
|
||||||
label: "Use format 'song - artist'",
|
label: "Use format 'song - artist'",
|
||||||
value: NameFormat.SongFirst
|
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({
|
export default definePlugin({
|
||||||
name: "LastFMRichPresence",
|
name: "LastFMRichPresence",
|
||||||
description: "Little plugin for Last.fm rich presence",
|
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: () => (
|
settingsAboutComponent: () => (
|
||||||
<>
|
<>
|
||||||
@ -298,6 +308,10 @@ export default definePlugin({
|
|||||||
return trackData.artist + " - " + trackData.name;
|
return trackData.artist + " - " + trackData.name;
|
||||||
case NameFormat.SongFirst:
|
case NameFormat.SongFirst:
|
||||||
return trackData.name + " - " + trackData.artist;
|
return trackData.name + " - " + trackData.artist;
|
||||||
|
case NameFormat.ArtistOnly:
|
||||||
|
return trackData.artist;
|
||||||
|
case NameFormat.SongOnly:
|
||||||
|
return trackData.name;
|
||||||
default:
|
default:
|
||||||
return settings.store.statusName;
|
return settings.store.statusName;
|
||||||
}
|
}
|
||||||
|
@ -370,6 +370,10 @@ export const Devs = /* #__PURE__*/ Object.freeze({
|
|||||||
blahajZip: {
|
blahajZip: {
|
||||||
name: "blahaj.zip",
|
name: "blahaj.zip",
|
||||||
id: 683954422241427471n,
|
id: 683954422241427471n,
|
||||||
|
},
|
||||||
|
archeruwu: {
|
||||||
|
name: "archer_uwu",
|
||||||
|
id: 160068695383736320n
|
||||||
}
|
}
|
||||||
} satisfies Record<string, Dev>);
|
} satisfies Record<string, Dev>);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user