File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ async def get_media_info():
39
39
global current_session
40
40
current_session = sessions .get_current_session ()
41
41
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' ) :
43
43
info = await current_session .try_get_media_properties_async ()
44
44
45
45
# song_attr[0] != '_' ignores system attributes
@@ -81,7 +81,7 @@ def volSlider(unused_addr, arg):
81
81
sessions = AudioUtilities .GetAllSessions ()
82
82
for session in sessions :
83
83
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" ) :
85
85
print ("Spotify volume: %s" % str (round (volume .GetMasterVolume (), 2 )))
86
86
volume .SetMasterVolume (arg , None )
87
87
CoUninitialize ()
You can’t perform that action at this time.
0 commit comments