Skip to content

Commit

Permalink
fix: Add UUID to mpris server name to allow multiple instances
Browse files Browse the repository at this point in the history
  • Loading branch information
janbuchar committed May 10, 2024
1 parent b488663 commit d7ea062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rorqual/__main__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import asyncio
import os
from threading import Thread
from uuid import uuid4

import textual.app
import typer
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d7ea062

Please sign in to comment.