diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 033260d..def68b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] steps: - uses: "actions/checkout@v3" diff --git a/songpal/main.py b/songpal/main.py index 5993216..e9a1719 100644 --- a/songpal/main.py +++ b/songpal/main.py @@ -45,7 +45,11 @@ def coro(f): """ def wrapper(*args, **kwargs): - loop = asyncio.get_event_loop() + try: + loop = asyncio.get_running_loop() + except RuntimeError: + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) try: return loop.run_until_complete(f(*args, **kwargs)) except KeyboardInterrupt: