OSD support for mplayer
MPC-API client additional arguments
This commit is contained in:
parent
e9e7e31de6
commit
9c3fcb0dc2
@ -12,6 +12,7 @@ if __name__ == '__main__':
|
||||
args = utils.get_configuration()
|
||||
if(args.mpc_path == None):
|
||||
sys.exit("You must supply mpc-path on first run")
|
||||
args.args.extend(['/open', '/new'])
|
||||
manager = client.Manager(args.host, args.port, args.name, lambda m: mpc_using_api.run_mpc(m, args.mpc_path, args.file, args.args))
|
||||
thread.start_new_thread(utils.stdin_thread, (manager,))
|
||||
manager.start()
|
||||
|
||||
@ -72,7 +72,9 @@ class MplayerProtocol(LineProcessProtocol):
|
||||
def send_get_property(self, name):
|
||||
self.writeLines('%s %s' % ('get_property', name))
|
||||
|
||||
|
||||
def display_message(self, message):
|
||||
self.writeLines('%s %s' % ('osd_show_text', message))
|
||||
|
||||
def send_get_filename(self):
|
||||
self.send_get_property('filename')
|
||||
|
||||
@ -128,7 +130,6 @@ def run_mplayer(manager, mplayer_path, args):
|
||||
|
||||
args = list(args)
|
||||
args.insert(0, mplayer_path)
|
||||
|
||||
process_protocol = MplayerProtocol(manager)
|
||||
reactor.spawnProcess(process_protocol, exec_path, args=args, env=None)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user