Giter Club home page Giter Club logo

Comments (12)

EAGrahamJr avatar EAGrahamJr commented on July 27, 2024 2

I have built a radio for my kids, running on a Raspberry Pi Zero 2W.

@MrTolchock I just built a Pirate Audio using a Pi Zero and all of the instructions in the README are easy to follow except for building the driver: the Pi Zero does not have enough memory to compile/link the library.

What I did:

  1. Repeat steps 1 and 2 on a Raspberry 3 running the 32-bit OS
  2. Do step 3 but do not run the install line
  3. Instead copy the .so file from the Pi 3 to the Zero
  4. Use the install program to install the .so just copied over

The "trick" is that the library driver has to be compiled on the target system and the Pi Zero can only run the 32-bit OS -- and everyone else in the world is now using 64-bits. 😏

from mopidy-spotify.

kingosticks avatar kingosticks commented on July 27, 2024 2

I've been playing on and off with automating the builds. There's a 32-bit Pi0 compatible deb at https://github.com/kingosticks/gst-plugin-spotify-build/suites/16959617041/artifacts/968984234 you can test if you like.

from mopidy-spotify.

psmsmets avatar psmsmets commented on July 27, 2024

You need to source the directory ~/.cargo/bin containing the Rust development tools (I assume you have the default install settings). The rustup.rs script added a line to your .bashrc. It is stated at the end of the install script in your terminal, or have a look at https://www.rust-lang.org/tools/install

To load the development tools either relogin or execute source "$HOME/.cargo/env.
Afterwards you should be able to execute cargo --version

from mopidy-spotify.

fatg3erman avatar fatg3erman commented on July 27, 2024

Thanks, but I've already done that. ~/.cargo/bin is on my PATH

which cargo
/home/bob/.cargo/bin/cargo

cargo --version
error: command failed: 'cargo': No such file or directory (os error 2)

The error is clearly coming from cargo itself, but I've tried setting CARGO_LOG=debug and I don't get any further information.

I did previously have cargo installed from the Raspbian repository but it was too old to build this project so I apt-purged it before installing as in the Mopidy instructions. Could there be some config somewhere that it left behind?

from mopidy-spotify.

kingosticks avatar kingosticks commented on July 27, 2024

How about invoking directly ?
'/home/bob/.cargo/bin/cargo --version'

from mopidy-spotify.

fatg3erman avatar fatg3erman commented on July 27, 2024

OK finally found it on Google. The issue is that Raspbian is 32-Bit and the installer incorrectly identifies it as 64 Bit.

You need to do a custom installation of Rust and, when asked for the default host triple, enter

arm-unknown-linux-gnueabihf

(This is for Raspberry Pi 4. It might be different for other Pi versions)

It has now built and installed. Now to see if I can remember my Spotify password....

from mopidy-spotify.

fatg3erman avatar fatg3erman commented on July 27, 2024

Hmm. Just reinstated my Spotify Premium subscription, regenerated the secrets, updated my mopidy.conf and

ERROR [SpotifyEventLoop] spotify.session Spotify login error: <ErrorType.USER_NEEDS_PREMIUM: 15>

apt-cache policy mopidy-spotify
mopidy-spotify:
  Installed: 4.1.1-0mopidy1
  Candidate: 4.1.1-0mopidy1
  Version table:
 *** 4.1.1-0mopidy1 500
        500 https://apt.mopidy.com buster/contrib armhf Packages
        100 /var/lib/dpkg/status

from mopidy-spotify.

kingosticks avatar kingosticks commented on July 27, 2024

You'll notice there is no new release yet. You'll need to remove mopidy-spotify Debian package and/or pypi package and install the latest development version from GitHub instead e.g. (using sudo if necessary)

pip install https://github.com/mopidy/mopidy-spotify/archive/master.zip

To be fair, this isn't at all clear from the readme. I had meant to address that, sorry.

from mopidy-spotify.

fatg3erman avatar fatg3erman commented on July 27, 2024

Fantastic! Thank you, Spotify has returned!

Big thanks for all your work on this, I really did think Spotify support would never come back. It's hugely appreciated.

Now, perhaps I should see about reinstating those spotify features I pulled out of RompR in a fit of rage?

from mopidy-spotify.

MrTolchock avatar MrTolchock commented on July 27, 2024

I have built a radio for my kids, running on a Raspberry Pi Zero 2W. It involves some hardware and Mopidy, and my main Python script uses MPD to make the buttons to do things with Mopidy/Spotify. The radio is not working anymore for more than a year, but I really want to fix it now. I'm a hobbyist and not a professional programmer, which option you think is the easiest to take:

  1. Use the dockers container someone posted here on this Github page (I'm not sure if and how I can communicate from my existing setup into dockers, can I use a normal script and MPD to communicate with Mopidy/Spotify which sits in a container?)
  2. Compile this rust thing as described by kingofsticks in the instructions (I failed to compile it though, I guess because my RPi Zero is not powerful enough, can I compile it on a RPi 4 and move the thing over to my RPi Zero?)
  3. Wait for the packaged solution (definitely easiest, but how long it will take until ready?)

from mopidy-spotify.

psmsmets avatar psmsmets commented on July 27, 2024

What I did was similar as @EAGrahamJr , cross-compile the .so on another machine, and install (copy the file to the gstreamer libs) on the RPi.

I did this for a 64-bit OS. You can find the compiled library on my website (see below). Tested on many RPi3b+ and 4, both running Raspberry Pi OS (64-bit, Debian Bullseye).
Never compiled/tested this for the 32-bit OS, but I could give it a go and publish the .so online as well.

What I do to install gstreamer with the spotify library:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
sudo curl --proto '=https' --tlsv1.2 --output /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstspotify.so https://www.pietersmets.be/share/libgstspotify.so
gst-inspect-1.0 spotify

from mopidy-spotify.

kingosticks avatar kingosticks commented on July 27, 2024

New pre-release at https://github.com/mopidy/mopidy-spotify/releases/tag/v5.0.0a1 and gst-plugins-spotify package for a few platforms at https://github.com/kingosticks/gst-plugins-rs-build/releases/tag/gst-plugin-spotify_0.12.2-1

from mopidy-spotify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.