But anyway, Spotify's application didn't exactly got better over the years. But instead of downgrading to an older, unsupported client that may be a bit better, but still not very good, I prefer just switching to an alternative client, if a good one exists.
A Spotify Premium subscription. Mopidy-Spotify will not work with Spotify Free, just Spotify Premium. A non-Facebook Spotify username and password. If you created your account through Facebook you’ll need to create a “device password” to be able to use Mopidy-Spotify. Mopidy-Spotify is dependent on pyspotify, a wrapper for Spotify’s libspotify C library.libspotify was deprecated in 2015 with no replacement. It is unmaintained, functionally limited, and also now unavailable from the Spotify developer site.Where possible we are moving to use Spotify’s Web API instead.However, native playback is still only possible using libspotify and there is no.
Expand your local library collection
Let’s start by looking again at our local collection. Storing music locally allows you reliable playback and complete control over how your music is organised. The downside is storage costs, so before embarking on ripping all your CDs, have a think about how you want to store them. Last month we discussed using abcde (A Better CD Encoder) to rip to FLAC, which produces large files with no quality loss. You can also consider using Ogg Vorbis. This open-source codec does involve quality loss, but produces much smaller files, and there’s every chance you won’t be able to tell the difference. To rip a CD to Ogg Vorbis:
Warning! Where you live may or may not allow the copying of data from a CD. Check here for more info.
Tag, you’re it
Many CD rippers, abcde included, will use online services to find information about your CD and automatically name files after the artist, album, and track name. They will also record that information inside the file itself so servers like Mopidy can display details about what’s playing. This is called tagging. Unfortunately, the online services don’t always get it right, so if you find a tag is misnamed or contains mistakes, you can use Kid3 to set the tags yourself. To install from the command line:
This desktop app provides easy bulk retagging of files and can even import artwork. Figuring configuring
In the following steps, we’ll be setting up a number of online services to interface directly with your Mopidy installation. In many cases, you’ll need to make changes to the Mopidy config file, so it’s worth explaining how it’s formatted. Each extension is named ‘Mopidy-Extension’. In the config file located at /etc/mopidy/mopidy.conf, Extension becomes [extension] and any relevant options go underneath that line in the form ‘key = value’. For example:
We’ve provided an example config file to help make sure things are properly set up.
Add Spotify to your Raspberry Pi audio streaming system
Now your local collection is set up, let’s move on to the first of our extensions. Spotify is an amazing collection of music. Wouldn’t it be great to be able to access not only Spotify’s archive but also your playlists and tagged artists? Mac buttons spotify. If you’ve got a Spotify Premium account, you can do just that. Start by installing the extension from the command line:
We now need to authorise Mopidy to use your account by visiting magpi.cc/mpdyspotify. Once you’re authorised, a config file will be displayed. Cut and paste this into /etc/mopidy/mopidy.conf and add your Spotify username and password. Spotify afternoon acoustic playlist download music. Free google home mjni from spotify. See the code listing overleaf for an example.
Now restart Mopidy:
Go back to Iris and the world of Spotify is literally at your fingertips.
Radio waves with TuneIn and RadioNet
How about adding radio stations to your Mopidy setup? There is easy and free access to thousands of radio stations streaming across the planet, catering for all interests. We have the option of two extensions for playing radio: TuneIn and RadioNet. The TuneIn extension provides access not only to live stations, but also historical recordings and is more suited to the curious browser rather that just getting to your favourite station. RadioNet is a simpler but easier-to-navigate service that allows you to create a list of favourite stations. To install:
Playing podcasts
If you prefer your radio programmes ‘on demand’, you’re probably a fan of podcasts. You’ve got two options for listening to your favourite shows on Mopidy. If you like to subscribe direct to podcast RSS feeds, then it’s as easy as this:
To use it, you need to point to an OPML file (a list of podcast locations), as shown in the listing. Most podcast clients can generate this for you. If you prefer to browse a huge catalogue of programming, then additionally install the iTunes plug-in:
Now you can use Browse to find your favourite show and listen on demand.
SomaFM
SomaFM was one of the early pioneers of internet audio streaming. Working through a donations model, it has expanded to over 30 channels, all with the theme of ambience but covering different genres from electronica to jazz. Often SomaFM makes for perfect background music. To add SomaFM to Mopidy (you’ve probably spotted a pattern emerging by now):
SoundCloud
SoundCloud is an excellent online showcase of music and other forms of audio. As well as providing a way for bands to sell direct to their fans, it’s a platform for new and upcoming material from unsigned musicians. You can browse SoundCloud’s vast collection from Mopidy, but as with Spotify, you need to have an account (it’s free to join) and authorise your installation.
First, visit mopidy.com/ext/soundcloud and follow the instructions to authorise Mopidy. Copy and paste the resulting config file, and add it to /etc/mopidy/mopidy.conf. Now install the SoundCloud extension:
sudo pip3 install Mopidy-SoundCloud sudo systemctl restart mopidy
YouTube
The ubiquitous YouTube contains countless hours of audio-specific content. Either listen to one of the many audio recordings uploaded or just the soundtrack of a favourite video. Again, the standard installation pattern applies:
One difference with this extension is the need to specifically enable it in /etc/mopidy/mopidy.conf. Make sure this is in the file or YouTube files will not appear in search results:
Digging through the archives
The Internet Archive (archive.org) is one of the crowning achievements of the internet. This vast resource aims to preserve anything that can be expressed in digital form. Unsurprisingly, its audio collection is vast, containing thousands of hours or public domain recordings, from vintage music to public speeches, documentaries, and a massive catalogue of Grateful Dead recordings! You can access all of these from your Mopidy system:
We recommend using the ‘Browse’ feature of Iris to navigate this resource. Search results can be overwhelming!
Party time, excellent!
You now have access to a mind-boggling array of music and audio. Time to celebrate. We’ve been using Iris as our interface to Mopidy, but in fact you can install different interfaces and even run them concurrently. If you’re having a few friends around, Mopidy-Party allows you to safely give everyone access to your music collection from their phones and add their picks to a playback queue. Now, who put Showaddywaddy on?
Make your own
Something missing from your collection? Is there no access to the latest and greatest streaming service? If you’re handy with a bit of Python coding, then you’re free to make your own Mopidy extensions and share them with users all over the world. Not only have the Mopidy developers provided detailed documentation, they have also provided a ‘cookiecutter’ project at magpi.cc/mpdycookie which will get you up and running in no time. Contributions to improve existing extensions are also welcomed.
pyspotify is packaged for various operating systems and in multiple Linuxdistributions. What way to install pyspotify is best for you depends upon yourOS and/or distribution.
Debian/Ubuntu: Install from apt.mopidy.com¶
The Mopidy project runs its own APT archive whichincludes pyspotify built for:
The packages are available for multiple CPU architectures: i386, amd64, armel,and armhf (compatible with Raspbian and all Raspberry Pi models).
To install and receive future updates:
Arch Linux: Install from AUR¶
If you are running Arch Linux on x86 or x86_64, you can install pyspotify usingthe python2-pyspotify package found in AUR.
Note
AUR does not provide libspotify for all CPU architectures e.g. arm. Seeinstalling from source in these cases.
OS X: Install wheel package from PyPI with pip¶
From PyPI, you can install precompiled wheel packages of pyspotify that bundlelibspotify. The packages should work on all combinations of:
OS X: Install from Homebrew¶
The Mopidy project maintains its own Homebrewtap which includes pyspotify andits dependencies.
Install from source¶
If you are on Linux, but your distro don’t package pyspotify, you can installpyspotify from PyPI using the pip installer. However, since pyspotify is aPython wrapper around the libspotify library, pyspotify necessarily depends onlibspotify and it must be installed first.
libspotify¶
libspotify is provided as a binary download for a selection of operatingsystems and CPU architectures from our unofficial libspotify archive. If libspotifyisn’t available for your OS or architecture, then you’re out of luck and can’tuse pyspotify either.
To install libspotify, use one of the options below, or follow the instructionsin the README file of the libspotify tarball.
Debian/Ubuntu¶
If you’re running a Debian-based Linux distribution, like Ubuntu,you can get Debian packages of libspotify from apt.mopidy.com. Follow the instructions above to make the apt.mopidy.com archive available on your system,then install libspotify:
Arch Linux¶
libspotify for x86 and x86_64 is packaged in AUR. Cooking applications download. To install libspotify,run:
Note
AUR only provides libspotify binaries for x86 and x86_64 CPUs. If yourequire libspotify for a different CPU architecture you’ll need to downloadit from our unofficial libspotify archive instead.
macOS¶
If you’re using Homebrew, it has a formula forlibspotify in the mopidy/mopidy tap:
Build tools¶
Spotify podcast taking forever to download. To build pyspotify, you need a C compiler, Python development headers, andlibffi development headers. All of this is easily installed using your system’spackage manager.
Debian/Ubuntu¶
If you’re on a Debian-based system, you can install the pyspotify builddependencies by running:
Arch Linux¶
If you’re on Arch Linux, you can install the pyspotify build dependencies byrunning:
macOS¶
If you’re on macOS, you’ll need to install the Xcode command line developertools. Even if you’ve already installed Xcode from the App Store, e.g. to getHomebrew working, you should run this command:
Note
If you get an error about
ffi.h not being found when installing thecffi Python package, try running the above command.
pyspotify¶
With libspotify and the build tools in place, you can finally build pyspotify.
Mopidy Spotify Free Music
To download and build pyspotify from PyPI, run:
Mopidy Home Assistant
Download video geby tinggal kenangan. Or, if you have a checkout of the pyspotify git repo, run:
Mopidy Spotify Free App
Once you have pyspotify installed, you should head over to Quickstartfor a short introduction to pyspotify.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |