diff --git a/src/main.py b/src/main.py index c32a4d14..84d9f8f7 100644 --- a/src/main.py +++ b/src/main.py @@ -100,7 +100,7 @@ def signal_handler(signum, frame): signal.signal(signal.SIGINT, signal_handler) signal.signal(signal.SIGTERM, signal_handler) -config = uvicorn.Config(app, host="0.0.0.0", port=8080, log_config=None) +config = uvicorn.Config(app, host="0.0.0.0", port=args.port, log_config=None) server = Server(config=config) with server.run_in_thread(): diff --git a/src/utils/cli.py b/src/utils/cli.py index 567bd83b..384596d8 100644 --- a/src/utils/cli.py +++ b/src/utils/cli.py @@ -33,6 +33,12 @@ def handle_args(): action="store_true", help="Start a Plex listener.", ) + parser.add_argument( + "-p", "--port", + type=int, + default=8080, + help='Port to run the server on (default: 8000)' + ) args = parser.parse_args()