From a54ff013d60d3a9d535e8443daafe33f0878ce50 Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Thu, 26 Sep 2024 20:39:07 +0200 Subject: [PATCH] music-assistant: 2.2.3 -> 2.2.6 https://github.com/music-assistant/server/releases/tag/2.2.4 https://github.com/music-assistant/server/releases/tag/2.2.5 https://github.com/music-assistant/server/releases/tag/2.2.6 --- pkgs/by-name/mu/music-assistant/ffmpeg.patch | 32 +++++++++++-------- pkgs/by-name/mu/music-assistant/frontend.nix | 4 +-- pkgs/by-name/mu/music-assistant/package.nix | 10 ++++-- pkgs/by-name/mu/music-assistant/providers.nix | 2 +- 4 files changed, 29 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/mu/music-assistant/ffmpeg.patch b/pkgs/by-name/mu/music-assistant/ffmpeg.patch index cb815203aa75..e0356bd4189b 100644 --- a/pkgs/by-name/mu/music-assistant/ffmpeg.patch +++ b/pkgs/by-name/mu/music-assistant/ffmpeg.patch @@ -1,8 +1,8 @@ diff --git a/music_assistant/server/helpers/audio.py b/music_assistant/server/helpers/audio.py -index 6b7b5c8e..ec3b92d7 100644 +index 80310604..0a72bcfc 100644 --- a/music_assistant/server/helpers/audio.py +++ b/music_assistant/server/helpers/audio.py -@@ -214,7 +214,7 @@ async def crossfade_pcm_parts( +@@ -74,7 +74,7 @@ async def crossfade_pcm_parts( await outfile.write(fade_out_part) args = [ # generic args @@ -11,16 +11,16 @@ index 6b7b5c8e..ec3b92d7 100644 "-hide_banner", "-loglevel", "quiet", -@@ -277,7 +277,7 @@ async def strip_silence( +@@ -135,7 +135,7 @@ async def strip_silence( + reverse: bool = False, ) -> bytes: """Strip silence from begin or end of pcm audio using ffmpeg.""" - fmt = ContentType.from_bit_depth(bit_depth) - args = ["ffmpeg", "-hide_banner", "-loglevel", "quiet"] + args = ["@ffmpeg@", "-hide_banner", "-loglevel", "quiet"] args += [ "-acodec", - fmt.name.lower(), -@@ -824,7 +824,7 @@ async def get_ffmpeg_stream( + pcm_format.content_type.name.lower(), +@@ -812,7 +812,7 @@ async def get_file_stream( async def check_audio_support() -> tuple[bool, bool, str]: """Check if ffmpeg is present (with/without libsoxr support).""" # check for FFmpeg presence @@ -29,7 +29,7 @@ index 6b7b5c8e..ec3b92d7 100644 ffmpeg_present = returncode == 0 and "FFmpeg" in output.decode() # use globals as in-memory cache -@@ -878,7 +878,7 @@ async def get_silence( +@@ -866,7 +866,7 @@ async def get_silence( return # use ffmpeg for all other encodings args = [ @@ -38,7 +38,11 @@ index 6b7b5c8e..ec3b92d7 100644 "-hide_banner", "-loglevel", "quiet", -@@ -972,7 +972,7 @@ def get_ffmpeg_args( +diff --git a/music_assistant/server/helpers/ffmpeg.py b/music_assistant/server/helpers/ffmpeg.py +index 0aaa9dcf..88cd9cdb 100644 +--- a/music_assistant/server/helpers/ffmpeg.py ++++ b/music_assistant/server/helpers/ffmpeg.py +@@ -200,7 +200,7 @@ def get_ffmpeg_args( # generic args generic_args = [ @@ -48,21 +52,21 @@ index 6b7b5c8e..ec3b92d7 100644 "-loglevel", loglevel, diff --git a/music_assistant/server/helpers/tags.py b/music_assistant/server/helpers/tags.py -index d17b55f6..b7b56c04 100644 +index c60ea526..162c4ab7 100644 --- a/music_assistant/server/helpers/tags.py +++ b/music_assistant/server/helpers/tags.py -@@ -380,7 +380,7 @@ async def parse_tags( - file_path = input_file if isinstance(input_file, str) else "-" - +@@ -401,7 +401,7 @@ async def parse_tags(input_file: str, file_size: int | None = None) -> AudioTags + Input_file may be a (local) filename or URL accessible by ffmpeg. + """ args = ( - "ffprobe", + "@ffprobe@", "-hide_banner", "-loglevel", "fatal", -@@ -471,7 +471,7 @@ async def get_embedded_image(input_file: str | AsyncGenerator[bytes, None]) -> b +@@ -462,7 +462,7 @@ async def get_embedded_image(input_file: str) -> bytes | None: + Input_file may be a (local) filename or URL accessible by ffmpeg. """ - file_path = input_file if isinstance(input_file, str) else "-" args = ( - "ffmpeg", + "@ffmpeg@", diff --git a/pkgs/by-name/mu/music-assistant/frontend.nix b/pkgs/by-name/mu/music-assistant/frontend.nix index 8bfd8d2da10e..f01e7f4bba41 100644 --- a/pkgs/by-name/mu/music-assistant/frontend.nix +++ b/pkgs/by-name/mu/music-assistant/frontend.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "music-assistant-frontend"; - version = "2.8.12"; + version = "2.8.13"; pyproject = true; src = fetchPypi { inherit pname version; - hash = "sha256-QqjryLHEpsdcZkIu/QmrQ0t9u4PysnE7FTXsIWBz7tk="; + hash = "sha256-bbNIYVFASAdeF1c+Nrcb92wMEBhrCMI8NdQvYhGvbLI="; }; postPatch = '' diff --git a/pkgs/by-name/mu/music-assistant/package.nix b/pkgs/by-name/mu/music-assistant/package.nix index 3435e3e5b916..654fdfedafe9 100644 --- a/pkgs/by-name/mu/music-assistant/package.nix +++ b/pkgs/by-name/mu/music-assistant/package.nix @@ -24,14 +24,14 @@ in python.pkgs.buildPythonApplication rec { pname = "music-assistant"; - version = "2.2.3"; + version = "2.2.6"; pyproject = true; src = fetchFromGitHub { owner = "music-assistant"; repo = "server"; rev = "refs/tags/${version}"; - hash = "sha256-7PIyo3srKwftakDiaxvZjrzo/1I9LGUwG+QGfIU5pRA="; + hash = "sha256-BEbcIq+qtJ1OffT2we6qajzvDYDu09rMcmJF1F06xZQ="; }; patches = [ @@ -91,9 +91,15 @@ python.pkgs.buildPythonApplication rec { pytest-cov-stub pytestCheckHook syrupy + pytest-timeout ] ++ lib.flatten (lib.attrValues optional-dependencies); + pytestFlagsArray = [ + # blocks in setup + "--deselect=tests/server/providers/jellyfin/test_init.py::test_initial_sync" + ]; + pythonImportsCheck = [ "music_assistant" ]; passthru = { diff --git a/pkgs/by-name/mu/music-assistant/providers.nix b/pkgs/by-name/mu/music-assistant/providers.nix index c15dc8e76a13..d085e4f1e89e 100644 --- a/pkgs/by-name/mu/music-assistant/providers.nix +++ b/pkgs/by-name/mu/music-assistant/providers.nix @@ -1,7 +1,7 @@ # Do not edit manually, run ./update-providers.py { - version = "2.2.3"; + version = "2.2.6"; providers = { airplay = ps: [ ];