Esempio n. 1
0
def d_cdStartPlaying(packet):
  pB_audio.pause()
  pB_audio.play()
  pB_display.setDisplay(True)
  pB_ticker.disableAllFunc()
  writeCurrentTrack()
  _displayTrackInfo()
Esempio n. 2
0
def d_cdStartPlaying(packet):
    pB_audio.pause()
    pB_audio.play()
    pB_display.setDisplay(True)
    pB_ticker.disableAllFunc()
    writeCurrentTrack()
    _displayTrackInfo()
Esempio n. 3
0
def d_togglePause(packet):
    logging.info("Play/Pause")
    status = pB_audio.getInfo()
    if (status['status']['state'] != "play"):
        pB_display.immediateText('Play')
        pB_audio.play()
    else:
        pB_display.immediateText('Pause')
        pB_audio.pause()
Esempio n. 4
0
def d_togglePause(packet):
  logging.info("Play/Pause")
  status = pB_audio.getInfo()
  if (status['status']['state'] != "play"):
    pB_display.immediateText('Play')
    pB_audio.play()
  else:
    pB_display.immediateText('Pause')
    pB_audio.pause()
Esempio n. 5
0
def d_cdStartPlaying(packet):
    pB_audio.pause()
    pB_audio.play()
    WRITER.writeBusPacket(
        'c8', '80',
        ['23', '42', '32', '1e'
         ])  #clear IKEConsole LCD of messages before filling it with MPD info
    pB_display.setDisplay(True)
    pB_ticker.disableAllFunc()
    writeCurrentTrack()
    _displayTrackInfo()
Esempio n. 6
0
def d_togglePause(packet):
  global AIRPLAY
  logging.info("Play/Pause")
  status = pB_audio.getInfo()
  if (status['status']['state'] != "play"):
    AIRPLAY = False
    pB_display.immediateText('Play')
    pB_audio.play()
  else:
    AIRPLAY = True
    pB_display.immediateText('Paused')
    pB_audio.pause()
Esempio n. 7
0
def d_togglePause(packet):
    global AIRPLAY
    logging.info("Play/Pause")
    status = pB_audio.getInfo()
    if (status['status']['state'] != "play"):
        AIRPLAY = False
        pB_display.immediateText('Play')
        pB_audio.play()
    else:
        AIRPLAY = True
        pB_display.immediateText('Paused')
        pB_audio.pause()
Esempio n. 8
0
def d_togglePause(packet):
    global AIRPLAY
    logging.info("Play/Pause")
    status = pB_audio.getInfo()
    if (status['status']['state'] != "play"):
        AIRPLAY = False
        WRITER.writeBusPacket('c8', '80', [
            '23', '42', '32', '1e'
        ])  #clear IKEConsole LCD of messages before filling it with MPD info
        pB_display.immediateText('Play')
        pB_audio.play()
    else:
        AIRPLAY = True
        WRITER.writeBusPacket('c8', '80', [
            '23', '42', '32', '1e'
        ])  #clear IKEConsole LCD of messages before filling it with MPD info
        pB_display.immediateText('Paused')
        pB_audio.pause()
Esempio n. 9
0
  def GET(self):
    getData = web.input(_method='get')
    if (getData.type == "add"):
      filePath = getData.path
      pB_audio.addSong(filePath)
      
    if (getData.type == "play"):
      filePath = getData.path
      pB_audio.playSong(filePath)

    if (getData.type == "remove"):
      filePath = getData.path
      pB_audio.removeSong(filePath)

    if (getData.type == "pause"):
      status = pB_audio.getInfo(currentTrackID)
      if status['status']['state'] == "stop":
        pB_audio.play()  
      else:
        pB_audio.pause()
    if (getData.type == "next"):
      pB_audio.next()
    if (getData.type == "previous"):
      pB_audio.previous()
Esempio n. 10
0
def d_cdStartPlaying(packet):
    pB_audio.play()
    pB_display.setDisplay(True)
    writeCurrentTrack()
    _displayTrackInfo()
Esempio n. 11
0
def d_cdStartPlaying(packet):
  pB_audio.play()
  pB_display.setDisplay(True)
  writeCurrentTrack()
  _displayTrackInfo()