better quit
This commit is contained in:
parent
569dd9a06d
commit
fed99721d6
1 changed files with 13 additions and 9 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue