LastFMRPC: add setting to show artist/song name in member list (#3629)
This commit is contained in:
parent
1cfc3fb8f8
commit
efecbae75b
1 changed files with 25 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ interface Activity {
|
||||||
buttons?: Array<string>;
|
buttons?: Array<string>;
|
||||||
name: string;
|
name: string;
|
||||||
application_id: string;
|
application_id: string;
|
||||||
|
status_display_type?: number;
|
||||||
metadata?: {
|
metadata?: {
|
||||||
button_urls?: Array<string>;
|
button_urls?: Array<string>;
|
||||||
};
|
};
|
||||||
|
|
@ -134,6 +135,25 @@ const settings = definePluginSettings({
|
||||||
type: OptionType.STRING,
|
type: OptionType.STRING,
|
||||||
default: "some music",
|
default: "some music",
|
||||||
},
|
},
|
||||||
|
statusDisplayType: {
|
||||||
|
description: "Show the track / artist name in the member list",
|
||||||
|
type: OptionType.SELECT,
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
label: "Don't show (shows generic listening message)",
|
||||||
|
value: "off",
|
||||||
|
default: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Show artist name",
|
||||||
|
value: "artist"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Show track name",
|
||||||
|
value: "track"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
nameFormat: {
|
nameFormat: {
|
||||||
description: "Show name of song and artist in status name",
|
description: "Show name of song and artist in status name",
|
||||||
type: OptionType.SELECT,
|
type: OptionType.SELECT,
|
||||||
|
|
@ -346,6 +366,11 @@ export default definePlugin({
|
||||||
|
|
||||||
details: trackData.name,
|
details: trackData.name,
|
||||||
state: trackData.artist,
|
state: trackData.artist,
|
||||||
|
status_display_type: {
|
||||||
|
"off": 0,
|
||||||
|
"artist": 1,
|
||||||
|
"track": 2
|
||||||
|
}[settings.store.statusDisplayType],
|
||||||
assets,
|
assets,
|
||||||
|
|
||||||
buttons: buttons.length ? buttons.map(v => v.label) : undefined,
|
buttons: buttons.length ? buttons.map(v => v.label) : undefined,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue