def update(): try: status = cd.get_status() except: status = 0 if status == 0: updated = True
def get_status(): """ Returns CD's playing state. Yes, this is just a wrapper around get_status. DEAL. ;)""" try: status = cd.get_status() except: # print "Error in play_pause" # # TODO: Do something. :P return 0 return status
def current_track(): # try: temp = cd.get_status(1) return int(temp['cur_t']) # except: return -1
def get_track_time(): min, sec, temp = cd.get_status(1)['rel'] return ((min * 60) + sec)