User can pass files to open
If the user passes text as argv to the program, we will call universal_open with each string in argv.
This commit is contained in:
parent
dc776ac267
commit
3831eb6e2a
|
@ -40,6 +40,7 @@ def init():
|
|||
import audio
|
||||
import controls
|
||||
from path import lastfm
|
||||
event.invite("POSTLIBLOAD", parse_user_input)
|
||||
|
||||
controls.init()
|
||||
event.start("POSTINIT")
|
||||
|
@ -63,4 +64,10 @@ def shutdown():
|
|||
event.start("POSTQUIT")
|
||||
|
||||
|
||||
def parse_user_input():
|
||||
import sys
|
||||
for item in sys.argv[1:]:
|
||||
path.files.universal_open(item)
|
||||
|
||||
|
||||
init()
|
||||
|
|
Loading…
Reference in New Issue