Skip to content

Commit 14bfa45

Browse files
authoredOct 4, 2022
Merge pull request #3 from x753/patch-3
This fixes the issue with Windows 11 not using the Process name (Spotify.exe) for the UWP Spotify app, will merge. Thanks
2 parents 354c5fe + ebd55c5 commit 14bfa45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎main.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ async def get_media_info():
3939
global current_session
4040
current_session = sessions.get_current_session()
4141
if current_session: # there needs to be a media session running
42-
if current_session.source_app_user_model_id == 'Spotify.exe':
42+
if current_session.source_app_user_model_id.startswith('Spotify'):
4343
info = await current_session.try_get_media_properties_async()
4444

4545
# song_attr[0] != '_' ignores system attributes
@@ -81,7 +81,7 @@ def volSlider(unused_addr, arg):
8181
sessions = AudioUtilities.GetAllSessions()
8282
for session in sessions:
8383
volume = session._ctl.QueryInterface(ISimpleAudioVolume)
84-
if session.Process and session.Process.name() == "Spotify.exe":
84+
if session.Process and session.Process.name().startswith("Spotify"):
8585
print("Spotify volume: %s" % str(round(volume.GetMasterVolume(), 2)))
8686
volume.SetMasterVolume(arg, None)
8787
CoUninitialize()

0 commit comments

Comments
 (0)
Please sign in to comment.