Beispiel #1
0
 def _back(self):
     system.mpcStop()
     system.mpcClear()
     self.play = False
     self.loaded = False
     self.killHelper()
     return SubMenu._back(self)
Beispiel #2
0
    def onSelected(self):
        SubMenu.onSelected(self)

        if self.loaded == False:
            system.mpcClear()
            for i in range(len(self.parent.tracks)):
                system.startCommand("mpc add cdda:///" + str(i + 1))

            self.loaded = True
            self.resetHelper()

        if self.play == False:
            system.mpcPlay()
            self.mpcH.updateView()
        else:
            system.mpcPause()
            self.mpcH.updateView()

        self.play = not self.play
Beispiel #3
0
    def onSelected(self):
        SubMenu.onSelected(self)

        # if content is not yet loaded in mpc, mpc playlist is cleared and then content is loaded
        # mpc helper is also started

        if self.loaded == False:
            system.mpcClear()
            cmd = "mpc search Album  \"" + self.name + "\" albumartist \"" + self.parent.name + "\" | mpc add"
            system.startCommand(cmd)
            self.loaded = True
            self.resetHelper()

        if self.play:
            system.mpcPause()
            self.mpcH.updateView()
            self.play = False
        else:
            system.mpcPlay()
            self.mpcH.updateView()
            self.play = True
Beispiel #4
0
    def onShowed(self):
        SubMenu.onShowed(self)

        system.mpcClear()
        system.startCommand("mpc add \"" + self.webAddr + "\"")
        system.mpcPlay()