LastfmRichPresence: Add option to use album name as status name (#2400)
Co-authored-by: vee <vendicated@riseup.net>
This commit is contained in:
parent
5c787145e3
commit
dd3b7e5346
1 changed files with 8 additions and 1 deletions
|
@ -77,7 +77,8 @@ const enum NameFormat {
|
||||||
ArtistFirst = "artist-first",
|
ArtistFirst = "artist-first",
|
||||||
SongFirst = "song-first",
|
SongFirst = "song-first",
|
||||||
ArtistOnly = "artist",
|
ArtistOnly = "artist",
|
||||||
SongOnly = "song"
|
SongOnly = "song",
|
||||||
|
AlbumName = "album"
|
||||||
}
|
}
|
||||||
|
|
||||||
const applicationId = "1108588077900898414";
|
const applicationId = "1108588077900898414";
|
||||||
|
@ -147,6 +148,10 @@ const settings = definePluginSettings({
|
||||||
{
|
{
|
||||||
label: "Use song name only",
|
label: "Use song name only",
|
||||||
value: NameFormat.SongOnly
|
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;
|
return trackData.artist;
|
||||||
case NameFormat.SongOnly:
|
case NameFormat.SongOnly:
|
||||||
return trackData.name;
|
return trackData.name;
|
||||||
|
case NameFormat.AlbumName:
|
||||||
|
return trackData.album || settings.store.statusName;
|
||||||
default:
|
default:
|
||||||
return settings.store.statusName;
|
return settings.store.statusName;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue