Skip to content

Commit

Permalink
feat: update discord rpc on config show rpc change
Browse files Browse the repository at this point in the history
  • Loading branch information
N0chteil committed Jul 29, 2023
1 parent 85b2c8e commit 3c9f7b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/managers/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class Discord {
"rpcDetails",
"rpcState",
"rpcLargeImageText",
"show",
"showAlbumArtwork",
"showTimestamps"
].forEach((key) => {
Expand Down Expand Up @@ -73,6 +74,14 @@ export class Discord {
);

Discord.setActivity(Discord.instance.activity);
} else if (type === "show") {
if (
config.get("show") &&
Discord.instance.currentTrack &&
Discord.instance.activity
) {
Discord.setActivity(Discord.instance.activity);
} else Discord.clearActivity();
} else if (type === "showAlbumArtwork") {
Discord.instance.activity.largeImageKey =
config.get("showAlbumArtwork") &&
Expand Down

0 comments on commit 3c9f7b7

Please sign in to comment.