Skip to content

Commit

Permalink
Added a default port.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheDaChicken committed Jun 16, 2019
1 parent 06c131e commit 31a932c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions SERVER/PYTHON-FILES/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
parser = argparse.ArgumentParser(description='Downloads Live streams when Youtube channels are live!')

# noinspection PyTypeChecker
parser.add_argument('-p', '--port', type=int, help='Port number', required=True, nargs='+', default=None)
parser.add_argument('-p', '--port', type=int, help='Port number', required=False, nargs='+', default=None)
parser.add_argument('-r', '--disable-reply', action='store_true')
parser.add_argument('-d', '--enable-debug', action='store_true')

Expand All @@ -31,13 +31,18 @@
if parser_args.enable_debug:
enable_debug()

if parser_args.port:
port = parser_args.port[0]
else:
port = 31311

for channel_id in channel_ids:
run_channel(channel_id)
sleep(.41)

sleep(1)

run_server(parser_args.port[0])
run_server(port)

if len(channel_ids) is 0:
warning("None channels found added into this program!")
Expand Down

0 comments on commit 31a932c

Please sign in to comment.