better quit

This commit is contained in:
j 2017-10-27 22:53:44 +02:00
parent 569dd9a06d
commit fed99721d6

View file

@ -14,11 +14,12 @@ logger = logging.getLogger('cdosea')
player = None
quit = False
def q_binding(*args):
global player
player.quit()
del player
quit = True
player.quit()
player = None
def main():
@ -61,11 +62,14 @@ def main():
pause_next = False
play_lights = True
while True:
if not quit and pause_next:
if not player:
break
if not quit:
if pause_next:
player.pause = True
pause_next = False
play_lights = False
elif not quit and player.path.decode().endswith('black.mp4'):
elif player.path.decode().endswith('black.mp4'):
pause_next = True
play_lights = False