mirror of
https://github.com/jeffvli/feishin.git
synced 2026-07-22 02:16:39 +02:00
clear discord rpc on player stop (#2239)
This commit is contained in:
@@ -100,13 +100,14 @@ export const useDiscordRpc = () => {
|
|||||||
|
|
||||||
if (
|
if (
|
||||||
!hasTrackOrRadio || // No track and not playing radio
|
!hasTrackOrRadio || // No track and not playing radio
|
||||||
(current[2] === 'paused' && !discordSettings.showPaused) // Paused with show paused setting disabled
|
current[2] === PlayerStatus.STOPPED || // Stopped (stop button or queue end)
|
||||||
|
(current[2] === PlayerStatus.PAUSED && !discordSettings.showPaused) // Paused with show paused setting disabled
|
||||||
) {
|
) {
|
||||||
let reason: string;
|
let reason: string;
|
||||||
if (!hasTrackOrRadio) {
|
if (!hasTrackOrRadio) {
|
||||||
reason = current[0] ? 'no_track' : 'no_track_or_radio';
|
reason = current[0] ? 'no_track' : 'no_track_or_radio';
|
||||||
} else if (current[1] === 0 && !isPlayingRadio) {
|
} else if (current[2] === PlayerStatus.STOPPED) {
|
||||||
reason = 'start_of_track';
|
reason = 'stopped';
|
||||||
} else {
|
} else {
|
||||||
reason = 'paused_with_show_paused_disabled';
|
reason = 'paused_with_show_paused_disabled';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user