mirror of
https://code.videolan.org/videolan/vlc
synced 2024-09-08 11:26:59 +02:00
mpris controller: update to new api
This commit is contained in:
parent
ac88248aa3
commit
a5b4ede658
@ -271,14 +271,22 @@ def icon_clicked(widget, event):
|
||||
# get playing status, modify the Play/Pause button accordingly
|
||||
def GetPlayStatus(widget):
|
||||
global playing
|
||||
global shuffle
|
||||
global loop
|
||||
global repeat
|
||||
status = player.GetStatus()
|
||||
if status == 0:
|
||||
|
||||
playing = status[0] == 0
|
||||
if playing:
|
||||
img_bt_toggle.set_from_stock("gtk-media-pause", gtk.ICON_SIZE_SMALL_TOOLBAR)
|
||||
playing = True
|
||||
else:
|
||||
img_bt_toggle.set_from_stock("gtk-media-play", gtk.ICON_SIZE_SMALL_TOOLBAR)
|
||||
playing = False
|
||||
|
||||
shuffle = status[1] == 1
|
||||
bt_shuffle.set_active( shuffle )
|
||||
loop = status[2] == 1
|
||||
bt_loop.set_active( loop )
|
||||
repeat = status[3] == 1
|
||||
bt_repeat.set_active( repeat )
|
||||
# loads glade file from the directory where the script is,
|
||||
# so we can use /path/to/mpris.py to execute it.
|
||||
import sys
|
||||
|
Loading…
Reference in New Issue
Block a user