mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-23 08:39:24 -05:00
LastFM EnableGameActivity
This commit is contained in:
parent
bb5e1ec822
commit
e140784f8f
1 changed files with 13 additions and 0 deletions
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
import { definePluginSettings } from "@api/Settings";
|
||||
import { getUserSettingLazy } from "@api/UserSettings";
|
||||
import { Link } from "@components/Link";
|
||||
import { Devs } from "@utils/constants";
|
||||
import { Logger } from "@utils/Logger";
|
||||
|
@ -81,6 +82,8 @@ const enum NameFormat {
|
|||
AlbumName = "album"
|
||||
}
|
||||
|
||||
const ShowCurrentGame = getUserSettingLazy<boolean>("status", "showCurrentGame")!;
|
||||
|
||||
const applicationId = "1108588077900898414";
|
||||
const placeholderId = "2a96cbd8b46e442fc41c2b86b821562f";
|
||||
|
||||
|
@ -129,6 +132,11 @@ const settings = definePluginSettings({
|
|||
type: OptionType.BOOLEAN,
|
||||
default: false,
|
||||
},
|
||||
enableGameActivity: {
|
||||
description: "Enable game activity for last.fm",
|
||||
type: OptionType.BOOLEAN,
|
||||
default: false,
|
||||
},
|
||||
statusName: {
|
||||
description: "custom status text",
|
||||
type: OptionType.STRING,
|
||||
|
@ -293,6 +301,11 @@ export default definePlugin({
|
|||
}
|
||||
|
||||
const trackData = await this.fetchTrackData();
|
||||
if (settings.store.enableGameActivity && trackData) {
|
||||
ShowCurrentGame.updateSetting(true);
|
||||
} else if (settings.store.enableGameActivity) {
|
||||
ShowCurrentGame.updateSetting(false);
|
||||
}
|
||||
if (!trackData) return null;
|
||||
|
||||
const largeImage = this.getLargeImage(trackData);
|
||||
|
|
Loading…
Add table
Reference in a new issue