import os
import sys

sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))

if __name__ == "__main__":
    try:
        from lib.router import Router

        router = Router(sys.argv)
        router.run()
    except Exception as exc:
        import xbmc
        xbmc.log(
            f"[FKStream] ERREUR: {type(exc).__name__}",
            xbmc.LOGERROR,
        )
