Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import subprocess
- import dbus
- import psutil
- try:
- session_bus = dbus.SessionBus()
- spotifyProxy = session_bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
- dbus.Interface(spotifyProxy, dbus_interface='org.mpris.MediaPlayer2.Player').Next()
- except dbus.exceptions.DBusException:
- pass
- b= False
- for proc in psutil.process_iter():
- if(proc.name() == 'foobar2000.exe'):
- b = True
- break
- if (b):
- subprocess.call('wine "/home/paremo/Exec/foobar2000/foobar2000.exe" /next', shell=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement