mirror of
https://github.com/Mastermindzh/tidal-hifi.git
synced 2025-08-06 04:46:49 +02:00
Add option to disable the discord rpc idle text
This commit is contained in:
@@ -14,6 +14,10 @@ export let rpc: Client;
|
||||
|
||||
const observer = () => {
|
||||
if (rpc) {
|
||||
const showIdle = settingsStore.get<string, boolean>(settings.discord.showIdle) ?? true;
|
||||
if (mediaInfo.status === MediaStatus.paused && !showIdle) {
|
||||
rpc.clearActivity();
|
||||
} else
|
||||
rpc.setActivity(getActivity());
|
||||
}
|
||||
};
|
||||
@@ -90,6 +94,10 @@ export const initRPC = () => {
|
||||
rpc.login({ clientId }).then(
|
||||
() => {
|
||||
rpc.on("ready", () => {
|
||||
const showIdle = settingsStore.get<string, boolean>(settings.discord.showIdle) ?? true;
|
||||
if (mediaInfo.status === MediaStatus.paused && !showIdle) {
|
||||
rpc.clearActivity();
|
||||
} else
|
||||
rpc.setActivity(getActivity());
|
||||
});
|
||||
ipcMain.on(globalEvents.updateInfo, observer);
|
||||
|
@@ -43,6 +43,7 @@ export const settingsStore = new Store({
|
||||
enableDiscord: false,
|
||||
discord: {
|
||||
showSong: true,
|
||||
showIdle: true,
|
||||
idleText: "Browsing Tidal",
|
||||
usingText: "Playing media on TIDAL",
|
||||
includeTimestamps: true,
|
||||
|
Reference in New Issue
Block a user