From d07e587abaf545dee4dae5d2af53705326170869 Mon Sep 17 00:00:00 2001 From: cjhesse <64333919+cjhesse@users.noreply.github.com> Date: Sun, 17 Apr 2022 16:50:51 -0500 Subject: [PATCH] Update MediaHook.cs In addition to looking for Spotify.exe, look for a media session with a name that matches the one the Windows Store version of Spotify uses. --- EZBlocker/EZBlocker/MediaHook.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EZBlocker/EZBlocker/MediaHook.cs b/EZBlocker/EZBlocker/MediaHook.cs index 6d343b9..f0787fe 100755 --- a/EZBlocker/EZBlocker/MediaHook.cs +++ b/EZBlocker/EZBlocker/MediaHook.cs @@ -43,7 +43,7 @@ private async Task RegisterSpotifyMediaSession(bool unmute) sessions.AddRange(SessionManager.GetSessions()); foreach (GlobalSystemMediaTransportControlsSession session in sessions) { - if (session != null && session.SourceAppUserModelId == "Spotify.exe") + if (session != null && ((session.SourceAppUserModelId == "Spotify.exe") || (session.SourceAppUserModelId == "SpotifyAB.SpotifyMusic_zpdnekdrzrea0!Spotify"))) { Debug.WriteLine("Registering " + session.GetHashCode()); if (unmute) AudioUtils.SetSpotifyMute(false);