Initial commit with the now playing
This commit is contained in:
commit
de2f9cccb7
25 changed files with 2729 additions and 0 deletions
25
app/__main__.py
Normal file
25
app/__main__.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
|
||||
from app.main import run_forever
|
||||
from app.tray import run_tray_app
|
||||
|
||||
|
||||
def main() -> None:
|
||||
p = argparse.ArgumentParser(prog="streamer-widgets")
|
||||
p.add_argument("--host", default="127.0.0.1")
|
||||
p.add_argument("--port", type=int, default=8765)
|
||||
p.add_argument("--tray", action="store_true", help="Run with Windows tray UI (recommended).")
|
||||
args = p.parse_args()
|
||||
|
||||
if args.tray:
|
||||
run_tray_app(host=args.host, port=args.port)
|
||||
else:
|
||||
run_forever(host=args.host, port=args.port)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue