~ubuntu-branches/ubuntu/utopic/radiotray/utopic

« back to all changes in this revision

Viewing changes to src/DbusFacade.py

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-05-09 21:24:43 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20130509212443-x1rgywggtb3bsorf
Tags: 0.7.3-1ubuntu1
* Merge from Debian unstable. (LP: #1156142, #972259, #972205)
  Remaining changes:
  - patch config to use appindicator by default
  - depend on python-appindicator

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        if self.mediator.isPlaying():
43
43
            return self.mediator.getContext().station
44
44
        else:
45
 
            return "not playing"
 
45
            return self.mediator.getContext().station + " (not playing)"
46
46
 
47
47
    @dbus.service.method('net.sourceforge.radiotray')
48
48
    def playRadio(self, radioName):
67
67
    @dbus.service.method('net.sourceforge.radiotray')
68
68
    def getCurrentMetaData(self):
69
69
        return self.mediator.getContext().getSongInfo()
 
70
 
 
71
    @dbus.service.method('net.sourceforge.radiotray')
 
72
    def togglePlay(self):
 
73
        if self.mediator.context.state == 'playing' or self.mediator.context.state == 'connecting':
 
74
            self.mediator.stop()
 
75
        else:
 
76
            self.mediator.playLast()