Skip to content

Commit 46f631b

Browse files
committed
dietpi-software: Mopidy: fix streaming on Trixie
1 parent b647876 commit 46f631b

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

CHANGELOG.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Bug fixes:
2828
- DietPi-Software | Home Assistant: Resolved an issue where the installation could have failed on RISC-V and ARMv6/7 Bookworm systems due to missing dependencies.
2929
- DietPi-Software | Home Assistant: Worked around an issue where the installation and service start failed due to a missing upper dependency declaration. The issue has been solved at Home Assistant for their upcoming release, which will make our workaround obsolete.
3030
- DietPi-Software | BirdNET-Go: The latest (pre-)release will now be detected and installed instead of a hardcoded version, which solves an upstream bug where reviewing bird detections did not work. Many thanks to @Sonnenfleck and @oturn for reporting the issue and testing newer versions, as well as @JappeHallunken for implementing the dynamic release download: https://github.com/MichaIng/DietPi/issues/7861, https://github.com/MichaIng/DietPi/issues/7861
31+
- DietPi-Software | Mopidy: Resolved an issue where fetching remote streams failed due to an incompatibility between Mopidy and GStreamer on Debian Trixie. Many thanks to @miloit for reporting this issue: https://github.com/MichaIng/DietPi/issues/7866
3132

3233
As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/7900
3334

dietpi/dietpi-software

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5106,9 +5106,45 @@ _EOF_
51065106
G_AGUP
51075107

51085108
# APT package
5109-
G_AGI mopidy gstreamer1.0-alsa mopidy-local
5109+
local deps=()
5110+
(( $G_DISTRO == 8 )) && deps=('patch') # Trixie: Patch for Python 3.13: https://github.com/MichaIng/DietPi/issues/7866
5111+
G_AGI mopidy gstreamer1.0-alsa mopidy-local "${deps[@]}"
51105112
G_EXEC systemctl stop mopidy
51115113

5114+
(( $G_DISTRO == 8 )) && ! grep -q '_get_structure_name' /lib/python3/dist-packages/mopidy/audio/scan.py && G_EXEC patch -d/ -p0 << '_EOF_'
5115+
--- /lib/python3/dist-packages/mopidy/audio/scan.py
5116+
+++ /lib/python3/dist-packages/mopidy/audio/scan.py
5117+
@@ -185,6 +185,11 @@
5118+
return query.parse_seeking()[1]
5119+
5120+
5121+
+def _get_structure_name(struct: Gst.Structure) -> str:
5122+
+ with struct as _struct:
5123+
+ return _struct.get_name()
5124+
+
5125+
+
5126+
def _process(pipeline, timeout_ms):
5127+
bus = pipeline.get_bus()
5128+
tags = {}
5129+
@@ -221,7 +226,7 @@
5130+
missing_message = msg
5131+
elif msg.type == Gst.MessageType.APPLICATION:
5132+
if msg.get_structure().get_name() == "have-type":
5133+
- mime = msg.get_structure().get_value("caps").get_name()
5134+
+ mime = _get_structure_name(msg.get_structure().get_value("caps"))
5135+
if mime and (
5136+
mime.startswith("text/") or mime == "application/xml"
5137+
):
5138+
@@ -232,7 +237,7 @@
5139+
error, _debug = msg.parse_error()
5140+
if missing_message and not mime:
5141+
caps = missing_message.get_structure().get_value("detail")
5142+
- mime = caps.get_structure(0).get_name()
5143+
+ mime = _get_structure_name(caps.get_structure(0))
5144+
return tags, mime, have_audio, duration
5145+
raise exceptions.ScannerError(str(error))
5146+
elif msg.type == Gst.MessageType.EOS:
5147+
_EOF_
51125148
G_EXEC_OUTPUT=1 G_EXEC pip3 install -U Mopidy-MusicBox-Webclient
51135149

51145150
# Assure user home, data and cache dir as well on custom configs

0 commit comments

Comments
 (0)