Loading
+15 −24
Original line number Diff line number Diff line
diff --git a/music_assistant/providers/snapcast/constants.py b/music_assistant/providers/snapcast/constants.py
index eb5ecb1a..92f03212 100644
index 8c897c72..d89a0cd2 100644
--- a/music_assistant/providers/snapcast/constants.py
+++ b/music_assistant/providers/snapcast/constants.py
@@ -43,7 +43,8 @@ CONTROL_SOCKET_PATH_TEMPLATE = "/tmp/ma-snapcast-{queue_id}.sock"  # noqa: S108
@@ -46,7 +46,8 @@
 MASS_STREAM_PREFIX = "Music Assistant - "
 MASS_ANNOUNCEMENT_POSTFIX = " (announcement)"
 SNAPWEB_DIR = pathlib.Path(__file__).parent.resolve().joinpath("snapweb")
@@ -13,18 +13,18 @@ index eb5ecb1a..92f03212 100644
 DEFAULT_SNAPCAST_FORMAT = AudioFormat(
     content_type=ContentType.PCM_S16LE,
diff --git a/music_assistant/providers/snapcast/provider.py b/music_assistant/providers/snapcast/provider.py
index 94c197fc..9a344f53 100644
index 049fb934..316b6cf8 100644
--- a/music_assistant/providers/snapcast/provider.py
+++ b/music_assistant/providers/snapcast/provider.py
@@ -32,6 +32,7 @@ from music_assistant.providers.snapcast.constants import (
@@ -35,6 +35,7 @@
     CONF_STREAM_IDLE_THRESHOLD,
     CONF_USE_EXTERNAL_SERVER,
     CONTROL_SCRIPT,
+    CONTROL_SCRIPT_DIR,
     CONTROL_SOCKET_PATH_TEMPLATE,
     DEFAULT_SNAPSERVER_CONFIG_FILE,
     DEFAULT_SNAPSERVER_PLUGIN_DIR,
     DEFAULT_SNAPSERVER_PORT,
     SNAPWEB_DIR,
@@ -215,6 +216,10 @@ class SnapCastProvider(PlayerProvider):
@@ -270,6 +271,10 @@ async def _builtin_server_runner(self) -> None:
 
         args = [
             "snapserver",
@@ -34,23 +34,14 @@ index 94c197fc..9a344f53 100644
+            "--config=/dev/null",
             # config settings taken from
             # https://raw.githubusercontent.com/badaix/snapcast/86cd4b2b63e750a72e0dfe6a46d47caf01426c8d/server/etc/snapserver.conf
             f"--server.datadir={self.mass.storage_path}",
@@ -227,6 +232,7 @@ class SnapCastProvider(PlayerProvider):
             f"--stream.buffer={self._snapcast_server_buffer_size}",
             f"--stream.chunk_ms={self._snapcast_server_chunk_ms}",
             f"--stream.codec={self._snapcast_server_transport_codec}",
+            f"--stream.plugin_dir={CONTROL_SCRIPT_DIR}",
             f"--config={self._snapcast_server_config_file}",
@@ -286,8 +291,7 @@ async def _builtin_server_runner(self) -> None:
             f"--stream.send_to_muted={str(self._snapcast_server_send_to_muted).lower()}",
             f"--streaming_client.initial_volume={self._snapcast_server_initial_volume}",
         ]
@@ -243,9 +249,7 @@ class SnapCastProvider(PlayerProvider):
                         # Copy control script after snapserver starts
                         # (run in executor to avoid blocking)
                         loop = asyncio.get_running_loop()
-                        self._controlscript_available = await loop.run_in_executor(
-                            None, self._setup_controlscript
-                        )
+                        self._controlscript_available = True
 
     def _get_ma_id(self, snap_client_id: str) -> str:
         search_dict = self._ids_map.inverse
-        loop = asyncio.get_running_loop()
-        plugin_dir = await loop.run_in_executor(None, self._setup_controlscript)
+        plugin_dir = CONTROL_SCRIPT_DIR
         if plugin_dir is not None:
             args.append(f"--stream.plugin_dir={plugin_dir}")
             self._controlscript_available = True
+7 −7
Original line number Diff line number Diff line
diff --git a/music_assistant/providers/airplay/helpers.py b/music_assistant/providers/airplay/helpers.py
index c5fef7eb..a628622d 100644
index 0d03b2cd..9cd59cf0 100644
--- a/music_assistant/providers/airplay/helpers.py
+++ b/music_assistant/providers/airplay/helpers.py
@@ -6,6 +6,7 @@
 import os
 import platform
@@ -9,6 +9,7 @@
 import socket
 import time
 from ipaddress import ip_address
+from shutil import which
 from typing import TYPE_CHECKING
 
 from zeroconf import IPVersion
@@ -176,7 +177,6 @@ async def check_binary(cli_path: str) -> str | None:
 from music_assistant_models.enums import ContentType
@@ -226,7 +227,6 @@ async def check_binary(cli_path: str) -> str | None:
             pass
         return None
 
@@ -18,7 +18,7 @@ index c5fef7eb..a628622d 100644
     system = platform.system().lower().replace("darwin", "macos")
     architecture = platform.machine().lower()
 
@@ -188,7 +188,7 @@ async def check_binary(cli_path: str) -> str | None:
@@ -238,7 +238,7 @@ async def check_binary(cli_path: str) -> str | None:
         raise RuntimeError(f"Unsupported streaming protocol requested: {protocol}")
 
     if bridge_binary := await check_binary(
+5 −5
Original line number Diff line number Diff line
diff --git a/music_assistant/helpers/util.py b/music_assistant/helpers/util.py
index bc14912b..0527a831 100644
index e91cd933..ed96d9b5 100644
--- a/music_assistant/helpers/util.py
+++ b/music_assistant/helpers/util.py
@@ -495,30 +495,11 @@ async def load_provider_module(domain: str, requirements: list[str]) -> Provider
@@ -602,30 +602,11 @@ def _get_provider_module(domain: str) -> ProviderModuleType:
             "ProviderModuleType", importlib.import_module(f".{domain}", "music_assistant.providers")
         )
 
@@ -35,10 +35,10 @@ index bc14912b..0527a831 100644
 async def has_tmpfs_mount() -> bool:
     """Check if we have a tmpfs mount."""
diff --git a/music_assistant/providers/ytmusic/__init__.py b/music_assistant/providers/ytmusic/__init__.py
index 9cc5981a..dc424b0b 100644
index 0ac8a70f..5d74e25b 100644
--- a/music_assistant/providers/ytmusic/__init__.py
+++ b/music_assistant/providers/ytmusic/__init__.py
@@ -200,7 +200,6 @@ class YoutubeMusicProvider(MusicProvider):
@@ -203,7 +203,6 @@ class YoutubeMusicProvider(MusicProvider):
     async def handle_async_init(self) -> None:
         """Set up the YTMusic provider."""
         logging.getLogger("yt_dlp").setLevel(self.logger.level + 10)
@@ -46,7 +46,7 @@ index 9cc5981a..dc424b0b 100644
         self._cookie = self.config.get_value(CONF_COOKIE)
         self._po_token_server_url = (
             self.config.get_value(CONF_PO_TOKEN_SERVER_URL) or DEFAULT_PO_TOKEN_SERVER_URL
@@ -1091,8 +1090,6 @@ class YoutubeMusicProvider(MusicProvider):
@@ -1103,8 +1102,6 @@ async def _install_packages(self) -> None:
         # NOTE: Google breaks things quite often which requires us to update
         # some packages very frequently. Installing them dynamically prevents
         # us from having to update MA to ensure this provider works.
+16 −16
Original line number Diff line number Diff line
diff --git a/music_assistant/controllers/streams/smart_fades/fades.py b/music_assistant/controllers/streams/smart_fades/fades.py
index 03c11ef9..460d53a6 100644
index 59246cce..673c3a10 100644
--- a/music_assistant/controllers/streams/smart_fades/fades.py
+++ b/music_assistant/controllers/streams/smart_fades/fades.py
@@ -76,7 +76,7 @@ class SmartFade(ABC):
         async with aiofiles.open(fadeout_filename, "wb") as outfile:
@@ -86,7 +86,7 @@ async def apply(
             await outfile.write(fade_out_part)
 
         args = [
-            "ffmpeg",
+            "@ffmpeg@",
@@ -12,19 +12,19 @@ index 03c11ef9..460d53a6 100644
             "-loglevel",
             "error",
diff --git a/music_assistant/helpers/audio.py b/music_assistant/helpers/audio.py
index 0674b009..53158f4d 100644
index f7828a58..698751f9 100644
--- a/music_assistant/helpers/audio.py
+++ b/music_assistant/helpers/audio.py
@@ -103,7 +103,7 @@ async def strip_silence(
     reverse: bool = False,
 ) -> bytes:
     """Strip silence from begin or end of pcm audio using ffmpeg."""
@@ -114,7 +114,7 @@ async def strip_silence(
     :param pcm_format: AudioFormat of the audio data.
     :param reverse: If True, strip from end instead of beginning.
     """
-    args = ["ffmpeg", "-hide_banner", "-loglevel", "quiet"]
+    args = ["@ffmpeg@", "-hide_banner", "-loglevel", "quiet"]
     args += [
         "-acodec",
         pcm_format.content_type.name.lower(),
@@ -1134,7 +1134,7 @@ async def get_silence(
@@ -300,7 +300,7 @@ async def get_silence(
         return
     # use ffmpeg for all other encodings
     args = [
@@ -34,10 +34,10 @@ index 0674b009..53158f4d 100644
         "-loglevel",
         "quiet",
diff --git a/music_assistant/helpers/ffmpeg.py b/music_assistant/helpers/ffmpeg.py
index 9ea5ea0c..51b1d62b 100644
index 9b7b1bbb..822424dc 100644
--- a/music_assistant/helpers/ffmpeg.py
+++ b/music_assistant/helpers/ffmpeg.py
@@ -249,7 +249,7 @@ def get_ffmpeg_args(  # noqa: PLR0915
@@ -267,7 +267,7 @@ def get_ffmpeg_args(  # noqa: PLR0915
         extra_output_args = []
     # generic args
     generic_args = [
@@ -46,7 +46,7 @@ index 9ea5ea0c..51b1d62b 100644
         "-hide_banner",
         "-loglevel",
         loglevel,
@@ -416,7 +416,7 @@ async def check_ffmpeg_version() -> None:
@@ -434,7 +434,7 @@ async def check_ffmpeg_version() -> None:
     """Check if ffmpeg is present (with libsoxr support)."""
     # check for FFmpeg presence
     try:
@@ -56,10 +56,10 @@ index 9ea5ea0c..51b1d62b 100644
         raise AudioError(
             "FFmpeg binary is missing from system. "
diff --git a/music_assistant/helpers/tags.py b/music_assistant/helpers/tags.py
index fe83301c..d35760b6 100644
index b50633f0..51e8ec7b 100644
--- a/music_assistant/helpers/tags.py
+++ b/music_assistant/helpers/tags.py
@@ -484,7 +484,7 @@ def parse_tags(
@@ -666,7 +666,7 @@ def parse_tags(
     Input_file may be a (local) filename or URL accessible by ffmpeg.
     """
     args = (
@@ -68,7 +68,7 @@ index fe83301c..d35760b6 100644
         "-hide_banner",
         "-loglevel",
         "fatal",
@@ -551,7 +551,7 @@ def get_file_duration(input_file: str) -> float:
@@ -737,7 +737,7 @@ def get_file_duration(input_file: str) -> float:
     NOT Async friendly.
     """
     args = (
@@ -77,7 +77,7 @@ index fe83301c..d35760b6 100644
         "-hide_banner",
         "-loglevel",
         "info",
@@ -707,7 +707,7 @@ async def get_embedded_image(input_file: str) -> bytes | None:
@@ -1368,7 +1368,7 @@ async def get_embedded_image(input_file: str) -> bytes | None:
 
     # Use FFmpeg for all other cases (URLs, ID3 tags, Vorbis comments, etc.)
     args = [
+2 −2
Original line number Diff line number Diff line
diff --git a/music_assistant/helpers/util.py b/music_assistant/helpers/util.py
index 377c7221..aaf6460d 100644
index e91cd933..088e76b7 100644
--- a/music_assistant/helpers/util.py
+++ b/music_assistant/helpers/util.py
@@ -305,7 +305,7 @@ async def get_ip_addresses(include_ipv6: bool = False) -> tuple[str, ...]:
@@ -365,7 +365,7 @@ def call() -> tuple[str, ...]:
                     continue
                 # ifaddr returns IPv6 addresses as (address, flowinfo, scope_id) tuples
                 ip_str = ip.ip[0] if isinstance(ip.ip, tuple) else ip.ip
Loading