From ba2012038f5a2f68a7246ef7f317ad2bbd93451c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 20 Sep 2012 10:57:09 +0200 Subject: [PATCH] Added force prompt option --- syncplay/ConfigurationGetter.py | 9 +++++---- syncplay/SyncplayMPC.py | 2 +- syncplay/client.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/syncplay/ConfigurationGetter.py b/syncplay/ConfigurationGetter.py index f35e818..b47dfee 100644 --- a/syncplay/ConfigurationGetter.py +++ b/syncplay/ConfigurationGetter.py @@ -24,12 +24,13 @@ class ConfigurationGetter(object): self._parser = argparse.ArgumentParser(description='Solution to synchronize playback of multiple MPlayer and MPC-HC instances over the network.', epilog='If no options supplied _config values will be used') self._parser.add_argument('--no-gui', action='store_true', help='show no GUI') - self._parser.add_argument('--host', metavar='hostname', type=str, help='server\'s address') - self._parser.add_argument('--name', metavar='username', type=str, help='desired username') + self._parser.add_argument('-a', '--host', metavar='hostname', type=str, help='server\'s address') + self._parser.add_argument('-n', '--name', metavar='username', type=str, help='desired username') self._parser.add_argument('-d','--debug', action='store_true', help='debug mode') + self._parser.add_argument('-g','--force-gui-prompt', action='store_true', help='make configuration prompt appear') self._parser.add_argument('--no-store', action='store_true', help='don\'t store values in syncplay.ini') - self._parser.add_argument('--room', metavar='room', type=str, nargs='?', help='default room') - self._parser.add_argument('--password', metavar='password', type=str, nargs='?', help='server password') + self._parser.add_argument('-r', '--room', metavar='room', type=str, nargs='?', help='default room') + self._parser.add_argument('-p', '--password', metavar='password', type=str, nargs='?', help='server password') self._parser.add_argument('file', metavar='file', type=str, nargs='?', help='file to play') self._parser.add_argument('_args', metavar='options', type=str, nargs='*', help='player options, if you need to pass options starting with - prepend them with single \'--\' argument') diff --git a/syncplay/SyncplayMPC.py b/syncplay/SyncplayMPC.py index ac91ac1..744ef47 100644 --- a/syncplay/SyncplayMPC.py +++ b/syncplay/SyncplayMPC.py @@ -18,7 +18,7 @@ class SyncplayMPC(SyncplayClient): self.args = self.argsGetter.getConfiguration() def _guiPromptForMissingArguments(self): - self.args = GuiConfigurationForMPC(self.args).getProcessedConfiguration() + self.args = GuiConfigurationForMPC(self.args, self.args.force_gui_prompt).getProcessedConfiguration() def _promptForMissingArguments(self): SyncplayClient._promptForMissingArguments(self) diff --git a/syncplay/client.py b/syncplay/client.py index 30ccf64..0fc54db 100644 --- a/syncplay/client.py +++ b/syncplay/client.py @@ -547,7 +547,7 @@ class SyncplayClient(object): self.args = self.argsGetter.getConfiguration() def _guiPromptForMissingArguments(self): - self.args = GuiConfiguration(self.args).getProcessedConfiguration() + self.args = GuiConfiguration(self.args, self.args.force_gui_prompt).getProcessedConfiguration() def _promptForMissingArguments(self): if(self.args.no_gui):