Skip to content

Commit bd15553

Browse files
authored
Merge pull request #332336 from mweinelt/music-assistant-2.1.1
music-assistant: 2.0.7 -> 2.1.1
2 parents 6085281 + 37baefd commit bd15553

File tree

7 files changed

+100
-26
lines changed

7 files changed

+100
-26
lines changed

pkgs/by-name/mu/music-assistant/ffmpeg.patch

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
diff --git a/music_assistant/server/helpers/audio.py b/music_assistant/server/helpers/audio.py
2-
index 42011923..1e5dc112 100644
2+
index 6b7b5c8e..ec3b92d7 100644
33
--- a/music_assistant/server/helpers/audio.py
44
+++ b/music_assistant/server/helpers/audio.py
5-
@@ -218,7 +218,7 @@ async def crossfade_pcm_parts(
5+
@@ -214,7 +214,7 @@ async def crossfade_pcm_parts(
66
await outfile.write(fade_out_part)
77
args = [
88
# generic args
@@ -11,7 +11,7 @@ index 42011923..1e5dc112 100644
1111
"-hide_banner",
1212
"-loglevel",
1313
"quiet",
14-
@@ -281,7 +281,7 @@ async def strip_silence(
14+
@@ -277,7 +277,7 @@ async def strip_silence(
1515
) -> bytes:
1616
"""Strip silence from begin or end of pcm audio using ffmpeg."""
1717
fmt = ContentType.from_bit_depth(bit_depth)
@@ -20,16 +20,16 @@ index 42011923..1e5dc112 100644
2020
args += [
2121
"-acodec",
2222
fmt.name.lower(),
23-
@@ -823,7 +823,7 @@ async def get_ffmpeg_stream(
23+
@@ -824,7 +824,7 @@ async def get_ffmpeg_stream(
2424
async def check_audio_support() -> tuple[bool, bool, str]:
2525
"""Check if ffmpeg is present (with/without libsoxr support)."""
2626
# check for FFmpeg presence
27-
- returncode, output = await check_output("ffmpeg -version")
28-
+ returncode, output = await check_output("@ffmpeg@ -version")
27+
- returncode, output = await check_output("ffmpeg", "-version")
28+
+ returncode, output = await check_output("@ffmpeg@", "-version")
2929
ffmpeg_present = returncode == 0 and "FFmpeg" in output.decode()
3030

3131
# use globals as in-memory cache
32-
@@ -877,7 +877,7 @@ async def get_silence(
32+
@@ -878,7 +878,7 @@ async def get_silence(
3333
return
3434
# use ffmpeg for all other encodings
3535
args = [
@@ -38,7 +38,7 @@ index 42011923..1e5dc112 100644
3838
"-hide_banner",
3939
"-loglevel",
4040
"quiet",
41-
@@ -971,7 +971,7 @@ def get_ffmpeg_args(
41+
@@ -972,7 +972,7 @@ def get_ffmpeg_args(
4242

4343
# generic args
4444
generic_args = [
@@ -48,10 +48,10 @@ index 42011923..1e5dc112 100644
4848
"-loglevel",
4949
loglevel,
5050
diff --git a/music_assistant/server/helpers/tags.py b/music_assistant/server/helpers/tags.py
51-
index dc38e4c0..f4f3e2fe 100644
51+
index d17b55f6..b7b56c04 100644
5252
--- a/music_assistant/server/helpers/tags.py
5353
+++ b/music_assistant/server/helpers/tags.py
54-
@@ -368,7 +368,7 @@ async def parse_tags(
54+
@@ -380,7 +380,7 @@ async def parse_tags(
5555
file_path = input_file if isinstance(input_file, str) else "-"
5656

5757
args = (
@@ -60,7 +60,7 @@ index dc38e4c0..f4f3e2fe 100644
6060
"-hide_banner",
6161
"-loglevel",
6262
"fatal",
63-
@@ -440,7 +440,7 @@ async def get_embedded_image(input_file: str | AsyncGenerator[bytes, None]) -> b
63+
@@ -471,7 +471,7 @@ async def get_embedded_image(input_file: str | AsyncGenerator[bytes, None]) -> b
6464
"""
6565
file_path = input_file if isinstance(input_file, str) else "-"
6666
args = (

pkgs/by-name/mu/music-assistant/frontend.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
buildPythonPackage rec {
88
pname = "music-assistant-frontend";
9-
version = "2.5.15";
9+
version = "2.7.0";
1010
pyproject = true;
1111

1212
src = fetchPypi {
1313
inherit pname version;
14-
hash = "sha256-D8VFdXgaVXSxk7c24kvb9TflFztS1zLwW4qGqV32nLo=";
14+
hash = "sha256-KrloxxdqIwQ5NsxAGm28D5StHnw9LTqDDtcchD5X5Qk=";
1515
};
1616

1717
postPatch = ''

pkgs/by-name/mu/music-assistant/package.nix

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ let
1111
python = python3.override {
1212
self = python;
1313
packageOverrides = self: super: {
14+
aiojellyfin = super.aiojellyfin.overridePythonAttrs rec {
15+
version = "0.9.2";
16+
17+
src = fetchFromGitHub {
18+
owner = "jc2k";
19+
repo = "aiojellyfin";
20+
rev = "refs/tags/v${version}";
21+
hash = "sha256-q+b1tKr46qq3PULPkCaQk2VoC1aaNxPK/E1Kj4PABfI=";
22+
};
23+
24+
doCheck = false;
25+
};
26+
1427
music-assistant-frontend = self.callPackage ./frontend.nix { };
1528
};
1629
};
@@ -24,14 +37,14 @@ in
2437

2538
python.pkgs.buildPythonApplication rec {
2639
pname = "music-assistant";
27-
version = "2.0.7";
40+
version = "2.1.1";
2841
pyproject = true;
2942

3043
src = fetchFromGitHub {
3144
owner = "music-assistant";
3245
repo = "server";
33-
rev = version;
34-
hash = "sha256-JtdlZ3hH4fRU5TjmMUlrdSSCnLrIGCuSwSSrnLgjYEs=";
46+
rev = "refs/tags/${version}";
47+
hash = "sha256-ALsl2xfAFYejDEhR5/ZpeIxoHFgvz471tb4OP5xQAUE=";
3548
};
3649

3750
patches = [
@@ -43,8 +56,6 @@ python.pkgs.buildPythonApplication rec {
4356
];
4457

4558
postPatch = ''
46-
sed -i "/--cov/d" pyproject.toml
47-
4859
substituteInPlace pyproject.toml \
4960
--replace-fail "0.0.0" "${version}"
5061
'';
@@ -71,6 +82,7 @@ python.pkgs.buildPythonApplication rec {
7182
certifi
7283
colorlog
7384
cryptography
85+
eyed3
7486
faust-cchardet
7587
ifaddr
7688
mashumaro
@@ -87,10 +99,13 @@ python.pkgs.buildPythonApplication rec {
8799
};
88100

89101
nativeCheckInputs = with python.pkgs; [
90-
ffmpeg-headless
102+
aiojellyfin
91103
pytest-aiohttp
104+
pytest-cov-stub
92105
pytestCheckHook
93-
] ++ lib.flatten (lib.attrValues optional-dependencies);
106+
syrupy
107+
]
108+
++ lib.flatten (lib.attrValues optional-dependencies);
94109

95110
pythonImportsCheck = [ "music_assistant" ];
96111

pkgs/by-name/mu/music-assistant/providers.nix

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
# Do not edit manually, run ./update-providers.py
22

33
{
4-
version = "2.0.7";
4+
version = "2.1.1";
55
providers = {
66
airplay = [
77
];
8+
apple_music = [
9+
]; # missing pywidevine
810
builtin = [
911
];
1012
chromecast = ps: with ps; [
@@ -29,8 +31,9 @@
2931
]; # missing hass-client
3032
hass_players = [
3133
];
32-
jellyfin = [
33-
]; # missing jellyfin_apiclient_python
34+
jellyfin = ps: with ps; [
35+
aiojellyfin
36+
];
3437
musicbrainz = [
3538
];
3639
opensubsonic = ps: with ps; [
@@ -48,6 +51,7 @@
4851
aioslimproto
4952
];
5053
snapcast = ps: with ps; [
54+
bidict
5155
snapcast
5256
];
5357
sonos = ps: with ps; [
@@ -71,8 +75,8 @@
7175
ugp = [
7276
];
7377
ytmusic = ps: with ps; [
74-
pytube
78+
yt-dlp
7579
ytmusicapi
76-
];
80+
]; # missing yt-dlp-youtube-accesstoken
7781
};
7882
}

pkgs/by-name/mu/music-assistant/update-providers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async def get_provider_manifests(version: str = "master") -> List:
102102
manifests = []
103103
with tempfile.TemporaryDirectory() as tmp:
104104
with urlopen(
105-
f"https://github.com/music-assistant/music-assistant/archive/{version}.tar.gz"
105+
f"https://github.com/music-assistant/music-assistant/archive/refs/tags/{version}.tar.gz"
106106
) as response:
107107
tarfile.open(fileobj=BytesIO(response.read())).extractall(
108108
tmp, filter="data"
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
lib,
3+
buildPythonPackage,
4+
fetchFromGitHub,
5+
6+
# build-system
7+
setuptools,
8+
9+
# dependencies
10+
aiohttp,
11+
mashumaro,
12+
13+
# tests
14+
pytestCheckHook,
15+
pytest-aiohttp,
16+
pytest-cov-stub,
17+
}:
18+
19+
buildPythonPackage rec {
20+
pname = "aiojellyfin";
21+
version = "0.10.0";
22+
pyproject = true;
23+
24+
src = fetchFromGitHub {
25+
owner = "Jc2k";
26+
repo = "aiojellyfin";
27+
rev = "v${version}";
28+
hash = "sha256-D4/DlhCeeI4CggW7KGauZ57fHY92JM/kZSUODyNVcNg=";
29+
};
30+
31+
build-system = [ setuptools ];
32+
33+
dependencies = [
34+
aiohttp
35+
mashumaro
36+
];
37+
38+
nativeCheckInputs = [
39+
pytestCheckHook
40+
pytest-aiohttp
41+
pytest-cov-stub
42+
];
43+
44+
pythonImportsCheck = [ "aiojellyfin" ];
45+
46+
meta = with lib; {
47+
description = "";
48+
homepage = "https://github.com/Jc2k/aiojellyfin";
49+
changelog = "https://github.com/Jc2k/aiojellyfin/blob/${src.rev}/CHANGELOG.md";
50+
license = licenses.asl20;
51+
maintainers = with maintainers; [ hexa ];
52+
};
53+
}

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,8 @@ self: super: with self; {
289289

290290
aioinflux = callPackage ../development/python-modules/aioinflux { };
291291

292+
aiojellyfin = callPackage ../development/python-modules/aiojellyfin { };
293+
292294
aiojobs = callPackage ../development/python-modules/aiojobs { };
293295

294296
aiokafka = callPackage ../development/python-modules/aiokafka { };

0 commit comments

Comments
 (0)