ma-mpris-bridge 0.4.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,11 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.egg-info/
4
+ .venv/
5
+ venv/
6
+ build/
7
+ dist/
8
+ .pytest_cache/
9
+ .ruff_cache/
10
+ # compiled translations are built by `make translations`
11
+ plasmoid/package/contents/locale/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 The music-assistant-kde-control contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,46 @@
1
+ Metadata-Version: 2.5
2
+ Name: ma-mpris-bridge
3
+ Version: 0.4.1
4
+ Summary: Expose Music Assistant players as MPRIS media players on the Linux desktop (KDE Plasma, GNOME, …)
5
+ Project-URL: Homepage, https://github.com/redeye86/music-assistant-kde-control
6
+ Project-URL: Issues, https://github.com/redeye86/music-assistant-kde-control/issues
7
+ License-Expression: MIT
8
+ License-File: LICENSE
9
+ Keywords: dbus,home-assistant,kde,mpris,music-assistant,plasma
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: No Input/Output (Daemon)
12
+ Classifier: Intended Audience :: End Users/Desktop
13
+ Classifier: Operating System :: POSIX :: Linux
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Topic :: Multimedia :: Sound/Audio :: Players
17
+ Requires-Python: >=3.13
18
+ Requires-Dist: aiohttp>=3.9
19
+ Requires-Dist: dbus-fast>=2.24
20
+ Requires-Dist: music-assistant-client<2,>=1.8
21
+ Provides-Extra: sendspin
22
+ Requires-Dist: sendspin<10,>=9; extra == 'sendspin'
23
+ Provides-Extra: test
24
+ Requires-Dist: pytest-asyncio>=0.24; extra == 'test'
25
+ Requires-Dist: pytest>=8; extra == 'test'
26
+ Requires-Dist: ruff>=0.6; extra == 'test'
27
+ Description-Content-Type: text/markdown
28
+
29
+ # ma-mpris-bridge
30
+
31
+ Shows [Music Assistant](https://music-assistant.io) players as **MPRIS** media players on the Linux desktop. Media keys, the KDE Plasma and GNOME media controls, the lock screen, KDE Connect and `playerctl` then all control your Music Assistant speakers.
32
+
33
+ ```bash
34
+ pipx install ma-mpris-bridge
35
+ ma-mpris-bridge run -v
36
+ ```
37
+
38
+ Server address and token come from the settings of the companion **Music Assistant Plasma widget** (several widgets with different servers are supported). Without the widget, run `ma-mpris-bridge login` or set `server_url`/`token` in `~/.config/ma-mpris-bridge/config.toml`.
39
+
40
+ The bridge supports play/pause/stop/next/previous, seek and position, volume (group volume for groups), shuffle, repeat and full metadata with cover art. It reconnects automatically. By default it only shows players that are playing or paused, and hides speakers synced into a group.
41
+
42
+ **This PC as a speaker:** `pipx install "ma-mpris-bridge[sendspin]"` adds the [Sendspin](https://music-assistant.io/player-support/sendspin/) player (needs the PortAudio library). When it is switched on in the widget settings, the bridge runs it, so Music Assistant can play on the PC. `ma-mpris-bridge status` shows what is installed and running; `ma-mpris-bridge install-service` sets up the autostart; `ma-mpris-bridge audio-devices` lists the outputs the speaker can use (set in the widget settings).
43
+
44
+ A systemd user unit, the full configuration reference and the companion KDE Plasma widget are in the [project repository](https://github.com/redeye86/music-assistant-kde-control).
45
+
46
+ MIT licensed. This is a community project and is not affiliated with Music Assistant.
@@ -0,0 +1,18 @@
1
+ # ma-mpris-bridge
2
+
3
+ Shows [Music Assistant](https://music-assistant.io) players as **MPRIS** media players on the Linux desktop. Media keys, the KDE Plasma and GNOME media controls, the lock screen, KDE Connect and `playerctl` then all control your Music Assistant speakers.
4
+
5
+ ```bash
6
+ pipx install ma-mpris-bridge
7
+ ma-mpris-bridge run -v
8
+ ```
9
+
10
+ Server address and token come from the settings of the companion **Music Assistant Plasma widget** (several widgets with different servers are supported). Without the widget, run `ma-mpris-bridge login` or set `server_url`/`token` in `~/.config/ma-mpris-bridge/config.toml`.
11
+
12
+ The bridge supports play/pause/stop/next/previous, seek and position, volume (group volume for groups), shuffle, repeat and full metadata with cover art. It reconnects automatically. By default it only shows players that are playing or paused, and hides speakers synced into a group.
13
+
14
+ **This PC as a speaker:** `pipx install "ma-mpris-bridge[sendspin]"` adds the [Sendspin](https://music-assistant.io/player-support/sendspin/) player (needs the PortAudio library). When it is switched on in the widget settings, the bridge runs it, so Music Assistant can play on the PC. `ma-mpris-bridge status` shows what is installed and running; `ma-mpris-bridge install-service` sets up the autostart; `ma-mpris-bridge audio-devices` lists the outputs the speaker can use (set in the widget settings).
15
+
16
+ A systemd user unit, the full configuration reference and the companion KDE Plasma widget are in the [project repository](https://github.com/redeye86/music-assistant-kde-control).
17
+
18
+ MIT licensed. This is a community project and is not affiliated with Music Assistant.
@@ -0,0 +1,67 @@
1
+ [build-system]
2
+ requires = ["hatchling>=1.24"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "ma-mpris-bridge"
7
+ version = "0.4.1"
8
+ description = "Expose Music Assistant players as MPRIS media players on the Linux desktop (KDE Plasma, GNOME, …)"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.13"
13
+ keywords = ["music-assistant", "mpris", "kde", "plasma", "dbus", "home-assistant"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: No Input/Output (Daemon)",
17
+ "Intended Audience :: End Users/Desktop",
18
+ "Operating System :: POSIX :: Linux",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.13",
21
+ "Topic :: Multimedia :: Sound/Audio :: Players",
22
+ ]
23
+ dependencies = [
24
+ "music-assistant-client>=1.8,<2",
25
+ "dbus-fast>=2.24",
26
+ "aiohttp>=3.9",
27
+ ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/redeye86/music-assistant-kde-control"
31
+ Issues = "https://github.com/redeye86/music-assistant-kde-control/issues"
32
+
33
+ [project.optional-dependencies]
34
+ # "This PC as a speaker": the Sendspin reference player (needs the PortAudio system library)
35
+ sendspin = ["sendspin>=9,<10"]
36
+ test = ["pytest>=8", "pytest-asyncio>=0.24", "ruff>=0.6"]
37
+
38
+ [project.scripts]
39
+ ma-mpris-bridge = "ma_mpris_bridge.cli:main"
40
+
41
+ [tool.hatch.build.targets.wheel]
42
+ packages = ["src/ma_mpris_bridge"]
43
+
44
+ [tool.hatch.build.targets.sdist]
45
+ include = ["src", "tests", "systemd", "README.md", "LICENSE"]
46
+
47
+ [tool.pytest.ini_options]
48
+ asyncio_mode = "auto"
49
+ asyncio_default_fixture_loop_scope = "function"
50
+ testpaths = ["tests"]
51
+
52
+ [tool.ruff]
53
+ line-length = 100
54
+ target-version = "py313"
55
+
56
+ [tool.ruff.lint]
57
+ select = ["E", "F", "W", "I", "UP", "B", "SIM", "ASYNC", "RUF", "BLE"]
58
+
59
+ [tool.ruff.lint.per-file-ignores]
60
+ # dbus-fast uses D-Bus type signatures ("s", "a{sv}", ...) as string annotations
61
+ "src/ma_mpris_bridge/mpris.py" = ["F821", "F722", "UP037"]
62
+ # runner.py: same, plus the long lines of the KRunner .desktop file it writes
63
+ "src/ma_mpris_bridge/runner.py" = ["F821", "F722", "UP037", "E501"]
64
+ "tests/*" = ["ASYNC109"]
65
+
66
+ [tool.ruff.lint.isort]
67
+ known-third-party = ["mock_ma_server"]
@@ -0,0 +1,3 @@
1
+ """Expose Music Assistant players as MPRIS media players."""
2
+
3
+ __version__ = "0.4.1"
@@ -0,0 +1,5 @@
1
+ import sys
2
+
3
+ from .cli import main
4
+
5
+ sys.exit(main())