Example #1
0
def d_standup(packet):
    WRITER.writeBusPacket(
        'c8', '80',
        ['23', '42', '32', '1e'
         ])  #clear IKEConsole LCD of messages before filling it with MPD info
    pB_display.immediateText('Comedy')
    pB_audio.playSong("Standup/first.mp3")
Example #2
0
 def get(self, actionType, encFilePath):
     filePath = unescape(encFilePath)
     logging.debug("Action (%s) File(%s)" % (actionType, filePath))
     if (actionType == "play"):
         try:
             logging.debug("Playing: %s" % filePath)
             pB_audio.playSong(filePath)
         except Exception, e:
             logging.error("Exception raised from playListModify")
             logging.error(traceback.format_exc())
Example #3
0
 def get(self, actionType, encFilePath):
     filePath = unescape(encFilePath)
     logging.debug("Action (%s) File(%s)" % (actionType, filePath))
     if (actionType == "play"):
         try:
             logging.debug("Playing: %s" % filePath)
             pB_audio.playSong(filePath)
         except Exception, e:
             logging.error("Exception raised from playListModify")
             logging.error(traceback.format_exc())
Example #4
0
def d_cdChange4(packet):
  logging.info("Running Custom 4")
  status = pB_audio.getInfo()
  if ('track' in status):
    trackStatus = status['track']
    if trackStatus:
      if ('album' in trackStatus):
          pB_audio.playSong(pB_audio.getNextAlbum(status['track']['album']))
          writeCurrentTrack()
          _displayTrackInfo()
      else:
           pB_audio.next()
           writeCurrentTrack()
           _displayTrackInfo()
Example #5
0
def speedTrigger(speed):
    global SESSION_DATA
    # This dictionary lists possible songs to play as well as times to skip to
    speedSongData = {
        "The Prodigy/Invaders Must Die.mp3": 49,
        "Edguy/Mandrake/05 - Wake Up The King.mp3": 93,
        "Killswitch Engage - Holy Diver": 144
    }
    if (speed > 100) and SESSION_DATA['SPEED_SWITCH']:
        songNames = speedSongData.keys()
        songIndex = random.randint(0, len(songNames) - 1)
        songName = songNames[songIndex]
        pB_audio.playSong(songName)
        pB_audio.seek(speedSongData[songName])
        WRITER.writeBusPacket('3F', '00', ['0C', '52', '01'])
        WRITER.writeBusPacket('3F', '00', ['0C', '41', '01'])
        WRITER.writeBusPacket('3F', '00', ['0C', '54', '01'])
        WRITER.writeBusPacket('3F', '00', ['0C', '44', '01'])
Example #6
0
def speedTrigger(speed):
  global SESSION_DATA
  # This dictionary lists possible songs to play as well as times to skip to
  speedSongData = {
    "The Prodigy/Invaders Must Die.mp3": 49,
    "Edguy/Mandrake/05 - Wake Up The King.mp3": 93,
    "Killswitch Engage - Holy Diver": 144
  }
  if (speed > 100) and SESSION_DATA['SPEED_SWITCH']:
    songNames = speedSongData.keys()
    songIndex = random.randint(0, len(songNames)-1)
    songName = songNames[songIndex]
    pB_audio.playSong(songName)
    pB_audio.seek(speedSongData[songName])
    WRITER.writeBusPacket('3F','00', ['0C', '52', '01'])
    WRITER.writeBusPacket('3F','00', ['0C', '41', '01'])
    WRITER.writeBusPacket('3F','00', ['0C', '54', '01'])
    WRITER.writeBusPacket('3F','00', ['0C', '44', '01'])
Example #7
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()
Example #8
0
def d_standup(packet):
  pB_display.immediateText('Comedy')
  pB_audio.playSong("Standup/first.mp3")
Example #9
0
def d_standup(packet):
  pB_display.cleardisplay():
  pB_display.immediateText('Comedy')
  pB_audio.playSong("Standup/first.mp3")