LibreELEC.tv
LibreELEC.tv copied to clipboard
librespot: update to 0.4.2 and addon (131)
update 0.3.1 (2021-10-25) to 0.4.2 (2022-07-29) release notes:
- https://github.com/librespot-org/librespot/releases/tag/v0.4.0
- https://github.com/librespot-org/librespot/releases/tag/v0.4.1
- https://github.com/librespot-org/librespot/releases/tag/v0.4.2
have you build and runtime tested this?
This post https://forum.libreelec.tv/thread/25931-librespot-no-longer-works/?postID=171641#post171641 indicates the notify kodi patch https://github.com/LibreELEC/LibreELEC.tv/blob/master/packages/addons/service/librespot/patches/librespot-01_notify_kodi.patch needs to be fixed or dropped, otherwise it doesn't build
I am sorry, I did not want to blast an ongoing discussion! I was just looking into the PRs in this repository and opened a new one as a starting point for a discussion (because I did not find one) :)
@heitbaum, as your PR appears to have a greater scope than mine, what about merging mine first to get librespot back into a running state and after that merging yours?
Fixing one issue with librespot-01_notify_kodi.patch
1982 | ... &track_id.to_base62()].join(" ")),
| ^^^^^^^^^^^^^^^^^^^^^ expected `str`, found enum `std::result::Result`
required a single change, the line should be &track_id.to_base62().unwrap()].join(" ")),
. I attached the complete patch file.
I tested librespot 0.4.2 by compiling it in the official Rust docker container on LibreElec 10.0.2 with the patch applied. I then copied the resulting binary librespot
over the one used by the Kodi add-on in /storage/.kodi/addons/service.librespot/bin/librespot
. With this the add-on works as expect on LE 10.0.2.
During building the second error
1979 | match event {
| ^^^^^ not found in this scope
did not occur. I didn't test building the add-on with the LE11 build system.
- The
old-api
branch, of which 0.4.2 is the latest version, seems to have issues when connecting to certain access points. This is being tracked on their repo. - The
new-api
ordev
branches don't seem to have this issue, but a stable version of these has not been released yet. I have successfully patched this version fornotify-kodi
and am using it on a RPi, but occasionally it will disconnect for seemingly no reason. I reckon this is due to the new api still being a bit unstable. - The
onevent
flag for librespot is going to get a lot more powerful as soon as this PR is merged, which should allow us to rewrite the addon without the need for patching, nor fetching data from the Spotify API. This is definitely what we should be aiming for in the long run. - Minor issue, but I noticed that we are building the Librespot binary with both the ALSA and Pulseaudio backends, but the ALSA backend is never actually used. I have built it with just the Pulseaudio backend and it works fine, so I don't see a reason to build it with both.
Moving to LE12. Still needs a patch for Kodi event handling
Superceeded by #7732