34
34
def setInterface( self ):
35
35
proxy_obj = self.bus.get_object( IFACE_NAME, IFACE_PATH )
36
36
self.iface = self.module.Interface( proxy_obj, IFACE_NAME )
38
def getCoverPath( self ):
44
def setCurrentSongData( self ):
45
if self.iface and self.isNameActive(IFACE_NAME):
46
self.artist = self.iface.GetTrackAttr('artist')
47
self.title = self.iface.GetTrackAttr('title')
48
self.album = self.iface.GetTrackAttr('album')
49
if self.artist == None:
51
if self.title == None:
53
if self.album == None:
55
if not self.isPlaying():
61
def getVersion( self ):
63
self.iface.GetVersion()
69
def isPlaying( self ):
70
trackInfo = str(self.iface.Query())
71
if string.split(trackInfo, ", ")[0] == "status: playing":
40
trackInfo = str(self.iface.Query())
41
if string.split(trackInfo, ", ")[0] == "status: playing":
79
if not self.iface or not self.isNameActive(IFACE_NAME):
82
if self.artist != self.iface.GetTrackAttr('artist') or \
83
self.title != self.iface.GetTrackAttr('title') or \
84
self.album != self.iface.GetTrackAttr('album') or \
85
self.playing != self.isPlaying():
86
self.setCurrentSongData()
46
if not self.isRunning():
54
artist = self.iface.GetTrackAttr('artist')
58
title = self.iface.GetTrackAttr('title')
62
album = self.iface.GetTrackAttr('album')
66
if self.artist != artist or self.title != title or self.album != album: