Add support for FreeBSD (#392)
authorMarcel van der Veldt <m.vanderveldt@outlook.com>
Fri, 1 Jul 2022 14:07:53 +0000 (16:07 +0200)
committerGitHub <noreply@github.com>
Fri, 1 Jul 2022 14:07:53 +0000 (16:07 +0200)
music_assistant/music_providers/librespot/freebsd/librespot [new file with mode: 0755]
music_assistant/music_providers/spotify.py

diff --git a/music_assistant/music_providers/librespot/freebsd/librespot b/music_assistant/music_providers/librespot/freebsd/librespot
new file mode 100755 (executable)
index 0000000..e48cfe5
Binary files /dev/null and b/music_assistant/music_providers/librespot/freebsd/librespot differ
index 891ad4593161fa1a4b1a34c918c1ca5759ce1756..fcb06d1f9526a9c68241a87cee1ae182a04c2d66 100644 (file)
@@ -696,6 +696,13 @@ class SpotifyProvider(MusicProvider):
             ):
                 return librespot
 
+        if platform.system() == "FreeBSD":
+            # FreeBSD binary is x86_64 intel
+            if librespot := await check_librespot(
+                os.path.join(base_path, "freebsd", "librespot")
+            ):
+                return librespot
+
         if platform.system() == "Linux":
             architecture = platform.machine()
             if architecture in ["AMD64", "x86_64"]:
@@ -721,5 +728,5 @@ class SpotifyProvider(MusicProvider):
                     return librespot
 
         raise RuntimeError(
-            f"Unable to locate Libespot for platform {platform.system()}"
+            f"Unable to locate Libespot for {platform.system()} ({platform.machine()})"
         )