[fix] clitools runner should work
This commit is contained in:
parent
75b3ae93a2
commit
4faf53168d
@ -12,6 +12,16 @@ from pathlib import Path
|
|||||||
import runner_lib as runner
|
import runner_lib as runner
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
def action_help():
|
||||||
|
global bindings
|
||||||
|
print("\nKey\tAction\n--------------------------------------")
|
||||||
|
for i in bindings:
|
||||||
|
print(" {}\t{}".format(bindings[i],i))
|
||||||
|
print("--------------------------------------\n")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bindings={
|
bindings={
|
||||||
"Show playlist" : "l",
|
"Show playlist" : "l",
|
||||||
"Launch [0-x] cmd" : "0-x",
|
"Launch [0-x] cmd" : "0-x",
|
||||||
@ -41,7 +51,7 @@ bindings={
|
|||||||
|
|
||||||
# Main Loop
|
# Main Loop
|
||||||
runner.action_info()
|
runner.action_info()
|
||||||
runner.action_help()
|
action_help()
|
||||||
print("\n\nLoad a playlist? [Y/n]: ")
|
print("\n\nLoad a playlist? [Y/n]: ")
|
||||||
if "y" == runner.inkey() :
|
if "y" == runner.inkey() :
|
||||||
runner.action_loadPlaylist()
|
runner.action_loadPlaylist()
|
||||||
@ -100,7 +110,7 @@ while True:
|
|||||||
runner.action_killPid()
|
runner.action_killPid()
|
||||||
continue
|
continue
|
||||||
elif bindings["Help"] == k:
|
elif bindings["Help"] == k:
|
||||||
runner.action_help()
|
action_help()
|
||||||
continue
|
continue
|
||||||
elif bindings["Information"] == k:
|
elif bindings["Information"] == k:
|
||||||
runner.action_info()
|
runner.action_info()
|
||||||
|
@ -178,16 +178,6 @@ def action_listAll():
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
def action_help():
|
|
||||||
global bindings
|
|
||||||
print("\nKey\tAction\n--------------------------------------")
|
|
||||||
for i in bindings:
|
|
||||||
print(" {}\t{}".format(bindings[i],i))
|
|
||||||
print("--------------------------------------\n")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def action_edit():
|
def action_edit():
|
||||||
print("Enter the command number to edit, or 'x' to abort.")
|
print("Enter the command number to edit, or 'x' to abort.")
|
||||||
@ -359,6 +349,7 @@ def action_killPid():
|
|||||||
|
|
||||||
def action_quit():
|
def action_quit():
|
||||||
print("Quit [Y/n]?")
|
print("Quit [Y/n]?")
|
||||||
|
global process
|
||||||
quit = inkey()
|
quit = inkey()
|
||||||
if quit != "n":
|
if quit != "n":
|
||||||
_kill(process)
|
_kill(process)
|
||||||
|
Loading…
Reference in New Issue
Block a user