From d7ea0620c262a92104be56bfe003df86fe1bb0c2 Mon Sep 17 00:00:00 2001 From: Jan Buchar Date: Fri, 10 May 2024 10:50:48 +0200 Subject: [PATCH] fix: Add UUID to mpris server name to allow multiple instances --- src/rorqual/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rorqual/__main__.py b/src/rorqual/__main__.py index a31848c..2852af9 100644 --- a/src/rorqual/__main__.py +++ b/src/rorqual/__main__.py @@ -1,6 +1,7 @@ import asyncio import os from threading import Thread +from uuid import uuid4 import textual.app import typer @@ -37,7 +38,7 @@ async def run_rorqual(): cover_manager = CoverManager(subsonic) player = SubsonicPlayer(stream_manager, asyncio.get_running_loop()) - mpris_server = Server("Rorqual", adapter=RorqualMprisAdapter(player, cover_manager)) + mpris_server = Server(f"Rorqual-${uuid4()}", adapter=RorqualMprisAdapter(player, cover_manager)) RorqualEventAdapter(player, cover_manager, mpris_server) mpris_server.publish() mpris_thread = Thread(target=mpris_server.loop, daemon=True)