First of all, great work on this project!
I am running mopidy on archlinux on a pogoplug series 4. It works great with the gmusic extension, and I have been streaming music from google play music - all access for a month or so without a hiccup.
However, I am unable to load any extensions other than gmusic. I have tried various web clients and other back end extensions and none of them load on startup. Perhaps this is related to some compatibility issues with the armv5 architecture. I previously installed mopidy on a raspberry pi with debian and all of the extensions loaded without a hitch.
[hunchan@alarm ~]# mopidy
** Message: pygobject_register_sinkfunc is deprecated (GstObject)
INFO Starting Mopidy 0.19.4
INFO Loading config from: builtin defaults, /etc/xdg/mopidy/mopidy.conf, /root/.config/mopidy/mopidy.conf, command line options
INFO Enabled extensions: gmusic, softwaremixer, http, mpd, stream
INFO Disabled extensions: local
INFO Starting Mopidy mixer: SoftwareMixer
INFO Mixing using GStreamer software mixing
INFO Mixer volume set to 50
INFO Starting Mopidy audio
INFO Starting Mopidy backends: GMusicBackend, StreamBackend
INFO Mopidy uses Google Music
INFO Audio output set to "autoaudiosink"
INFO Starting Mopidy core
INFO Start refreshing Google Music library
INFO Starting Mopidy frontends: MpdFrontend, HttpFrontend
INFO MPD server running at [::]:6600
INFO HTTP server running at [::]:6680
INFO Loaded 10 playlists from Google Music
INFO Finished refreshing Google Music content in 97s
Hmm so do all the extensions, including the missing ones, come from AUR? I haven’t actually used Arch for many years (since I retired my pogoplug v2, as it happens!). Do the missing ones exist in /usr/lib/python2.7/site-packages?
Perhaps someone more familiar with Arch can be of more help (@trygveaa) ? Failing that, there are usually a couple of Arch people in the #mopidy IRC channel so try asking in there directly.
Yeah, I installed/built most of them using the PKGBUILDs available on AUR, but some were installed with yaourt and pip. You may be on to something, because the extensions are not in
/usr/lib/python2.7/site-packages. Instead they are in: /usr/lib/python3.4/site-packages
Thanks for your help, I’ll try out the #mopidy IRC channel.
The extensions you installed from AUR should be under python2.7. To install extensions with pip and get them under 2.7 you have to use the pip2 command.
Thanks trygveaa!!!
That worked like a charm. I uninstalled the extensions and reinstalled them using pip2. Now all of the web clients and backend extenstions load up and work beautifully, with the exception of mopidy-spotfy.
When I try to start mopidy with spotify enabled I get:
ImportError: libspotify.so.12: cannot open shared object file: No such file or directory
libspotify.so.12 is in the /usr/local/lib directory, or at least a symlink called libspotify.so.12 which is linked to libspotify.so.12.1.51.
Anyway, everything else is is working great. Much appreciated!!!
Yeah, I tried to install mopidy-spotify using yaourt first, but unfortunately the PKGBUILD for libspotify does not include instructions for armv5, so it fails to build. The file looks like this:
# Maintainer: Benjamin Hedrich <kiwisauce@pagenotfound.de> Contributor:
# Thomas Jost <schnouki@schnouki.net> Contributor: Tomas Strand
# <tomas@fik1.net>
pkgname=libspotify
pkgver=12.1.51
pkgrel=3
pkgdesc="C API package allowing third-party developers to write applications that utilize the Spotify music streaming service"
arch=(i686 x86_64 armv7h armv6h)
url="https://developer.spotify.com/technologies/libspotify/"
license=('custom')
depends=('glibc')
if [ "$CARCH" == "armv6h" ]; then
pkgver=12.1.103
SPOTIFY_ARCH="armv6-bcm2708hardfp"
md5sums=('bf9afc8c7b966841735734b248f9c7a7')
sha256sums=('d658e6c1978fb46cf33376eb8367a51d024f4014f21beac1dd264532bcc54b24')
fi
if [ "$CARCH" == "armv7h" ]; then
SPOTIFY_ARCH="armv7"
md5sums=('eb7e98849b3bb6d364fa74034602afbf')
sha256sums=('ad27b6c5aee5382b66b39bfea3b1752076b7abcc445979ce25c1ec9d7ff3aeda')
fi
if [ "$CARCH" == "x86_64" ]; then
SPOTIFY_ARCH="x86_64"
md5sums=('83efddcc195d6ff12b24c97c767a5e45')
sha256sums=('43a14e0732ba6ae30078fac105d0e2998d04d5f5c396a4968386bc4e22491058')
fi
if [ "$CARCH" == "i686" ]; then
SPOTIFY_ARCH="i686"
md5sums=('04735b890da0b1fc7f1f14e68a5293de')
sha256sums=('941ab4ba10bcd6ec4e96127afd095a39e11bc955de0882734c97e4f588b155ae')
fi
source=(http://developer.spotify.com/download/libspotify/libspotify-${pkgver}-Linux-${SPOTIFY_ARCH}-release.tar.gz)
build() {
cd "$srcdir/$pkgname-$pkgver-Linux-${SPOTIFY_ARCH}-release"
# Don't do stupid things from a Makefile
msg2 "Patching Makefile..."
sed -i 's/ldconfig//' Makefile
}
package() {
cd "$srcdir/$pkgname-$pkgver-Linux-${SPOTIFY_ARCH}-release"
make prefix="$pkgdir/usr" install
# Install documentation
cp -R share "$pkgdir"/usr/share
mkdir -p "$pkgdir"/usr/share/man
mv "$pkgdir"/usr/share/man3 "$pkgdir"/usr/share/man/man3
# Correct pkgconfig file
sed -e s:PKG_PREFIX:/usr:g \
< lib/pkgconfig/libspotify.pc \
> "$pkgdir"/usr/lib/pkgconfig/libspotify.pc
# Custom license
install -Dm644 LICENSE licenses.xhtml "$pkgdir"/usr/share/doc/libspotify
mkdir -p "$pkgdir"/usr/share/licenses/libspotify
ln -s ../../doc/libspotify/LICENSE "$pkgdir"/usr/share/licenses/libspotify/LICENSE
}
Where to look for the library isn’t controlled by pyspotify, but by /etc/ld.so.conf. If you add /usr/local/lib to that file, and then run sudo ldconfig, pyspotify should be able to find libspotify even when installed in /usr/local/lib.
Euraka! You solved it. That did the trick. I installed mopidy-spotify and pyspotify using pip2, and libspotify using the binary downloaded from: https://developer.spotify.com/technologies/libspotify/
Then I followed your instruction and the extension loaded up without a hitch.
Thanks a lot, maybe this can help anyone else out there trying to hack the pogolug series 4 into a music streamer (doubtful). It is a brilliant device… now. It’s amazing what 128MBs of ram can do!