#!/usr/bin/env python3
"""Standalone TCP GDR/XDVD host server wrapper.

This wrapper intentionally forces gdr_host_tcp_bridge.py into --serve mode so
legacy runner commands such as `python gdr_host_server.py disc.xdvd.json disc.iso
--catalog ... --ready-file ...` continue to work.
"""
from __future__ import annotations

import sys

from gdr_host_tcp_bridge import main


def _argv_with_serve() -> list[str]:
    argv = list(sys.argv)
    if '--serve' not in argv:
        argv.append('--serve')
    return argv


if __name__ == '__main__':
    sys.argv = _argv_with_serve()
    raise SystemExit(main())
