Пример #1
0
def update():
	try:
		status = cd.get_status()
	except:
		status = 0

	if status == 0:
		updated = True
Пример #2
0
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
Пример #3
0
def current_track():
	# try:
		temp = cd.get_status(1)
		return int(temp['cur_t'])
	# except:
		return -1
Пример #4
0
def get_track_time():
	min, sec, temp = cd.get_status(1)['rel']
	return ((min * 60) + sec)