fix port parsing
This commit is contained in:
parent
df1eb190cb
commit
b2efaf8ece
1 changed files with 3 additions and 7 deletions
|
@ -129,8 +129,8 @@ def main():
|
|||
prefix = os.path.expanduser('~/Videos/CDOSEA')
|
||||
|
||||
parser = argparse.ArgumentParser(description='play 2 screens in sync')
|
||||
parser.add_argument('--peer', help='ipof peer', required=True)
|
||||
parser.add_argument('--peer', help='port of peer')
|
||||
parser.add_argument('--peer', help='ip of peer', required=True)
|
||||
parser.add_argument('--peer-port', help='port of peer', default=DEFAULT_PORT)
|
||||
parser.add_argument('--port', type=int, help='local port', default=DEFAULT_PORT)
|
||||
parser.add_argument('--playlist', help='play.m3u', default=playlist)
|
||||
parser.add_argument('--prefix', help='video location', default=prefix)
|
||||
|
@ -138,11 +138,7 @@ def main():
|
|||
parser.add_argument('--debug', action='store_true', help='debug', default=False)
|
||||
args = parser.parse_args()
|
||||
|
||||
if ':' in args.peer:
|
||||
peer = args.peer.split(':')
|
||||
peer = (peer[0], int(peer[1]))
|
||||
else:
|
||||
peer = (args.peer, DEFAULT_PORT)
|
||||
peer = (args.peer, args.peer_port)
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
|
|
Loading…
Reference in a new issue