Code Monkey home page Code Monkey logo

mopidy-spotify-web's Introduction

Mopidy-Spotify-Web

Mopidy extension for providing the browse feature of Spotify. This lets you browse artists and albums of your spotify user account library.

Uses the Spotipy API, which is a python wrapper arround the spoitify web api.

Dependencies

  • A Spotify Premium subscription. Mopidy-Spotify will not work with Spotify Free, just Spotify Premium.
  • A non-Facebook Spotify username and password.
  • Mopidy >= 0.19.0. The music server that Mopidy-Spotify-Tunigo extends.
  • Mopidy-Spotify >= 1.2.0. The Mopidy extension for playing music from Spotify.
  • Spotipy. A library for accessing the Spotify web-api.
  • requests. HTTP for Humans.

Installation

install the package from PyPI:

pip install Mopidy-Spotify-Web

Configuration

To run this extension you need to authorize it against you Spotify account, to do this visit https://www.mopidy.com/authenticate/#spotify and follow the instructions.

Example configuration:

[spotify_web]
client_id = ... client_id value you got from mopidy.com ...
client_secret = ... client_secret value you got from mopidy.com ...

The following configuration values are available:

  • spotify_web/enabled: If the Spotify extension should be enabled or not. Defaults to true.
  • spotify_web/client_id: Your Spotify application client id. You must provide this.
  • spotify_web/client_secret: Your Spotify application secret key. You must provide this.
  • spotify_web/mopidy_token_url: url to the authorization endpoint of the Mopidy OAuth bridge for Spotify. Defaults to https://auth.mopidy.com/spotify/token.
  • spotify_web/use_mopidy_oauth_bridge: Use this flag to switch between the Mopidy OAuth bridge and spotify authentication service. Defaults to true.
  • spotify_web/refresh_token: Your Spotify refresh token. This only needs to be provided if you do not want to use the Mopidy OAuth bridge.
  • spotify_web/spotify_token_url: url to the authorization endpoint of the Spotify Accounts service. Defaults to https://accounts.spotify.com/api/token.
Note:

In order to use mopidy-spotify-web the plugin requires to authenticate using OAuth. The easiest way is to use the OAuth bridge from Mopidy. This is configured as a default. If you do not wish to use this service on mopidy.com you can authenticate with Spotify directly. In order to do this you need to setup an application on https://developer.spotify.com/my-applications/ and then follow the tutorial on https://developer.spotify.com/web-api/tutorial/ to obtain a refresh_token. The refresh token must then be configured in the Mopidy configuration file. Please make sure to include the user-library-read scope when requesting the refresh token.

Project resources

Changelog

v0.3.0 (2016-01-24)

  • Albums are now sorted by track number

v0.2.0 (2015-06-25)

  • Use requests module for fetching tokens.
  • Blocking initialization moved out of critical startup path.
  • Various internal cleanups to make code more Pythonic.
  • Switch to using Mopidy's token swap service for simpler authentication.
  • Sorted the albums and artists.
  • Integrated Spotify browse feature.
  • Added feature to browse all albums and top tracks of your artists.

v0.1.0 (2015-05-03)

  • Initial release.

mopidy-spotify-web's People

Contributors

adamcik avatar fredericgermain avatar lfcabend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mopidy-spotify-web's Issues

Authentication does not work

The authtentication is not working as documented.
The Mopidy auth website does not provide the needed client_id and client_secret
https://www.mopidy.com/authenticate
if you log in the popup window just closes instantly without providing any information.
i don't know if you are the right person for this problem but i just wanted to point out that problem.

ModuleNotFoundError: No module named 'translator'

Hi,

when running mopidy, it keeps giving me an error, that the module translator is not found. Can someone maybe help?
I also looked into the install pip3 and the file translator.py is there.
I am trying to run mopidy on a raspberry pi with raspian.

Thank you in advance.

Connection issue

Hi there

I am using modipy with mopidy-spotify and spotmop as a web interface, on Raspbian Jessie.
All was working great and then I noticed that the artists, tracks and albums were unavailable, and after a quick google found modify-spotify-web :)
I made sure I have the dependancies, installed modipy-spotify-web, went to https://www.mopidy.com/authenticate/#spotify and got the authentication values and put them in a [spotify-web] section of the mopidy conf file. I have premium account.

Now when I start Modipy, I get the following error.
The web interface still works, but I still can't access artists, tracks and albums.

ERROR    Unhandled exception in SpotmopFrontend (urn:uuid:a95eae50-d226-4981-a8f6-4ab13e3a086c):
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pykka/actor.py", line 192, in _actor_loop
    self.on_start()
  File "/usr/local/lib/python2.7/dist-packages/mopidy_spotmop/frontend.py", line 46, in on_start
    self.pusher.listen(port)
  File "/usr/lib/python2.7/dist-packages/tornado/web.py", line 1687, in listen
    server.listen(port, address)
  File "/usr/lib/python2.7/dist-packages/tornado/tcpserver.py", line 117, in listen
    sockets = bind_sockets(port, address=address)
  File "/usr/lib/python2.7/dist-packages/tornado/netutil.py", line 104, in bind_sockets
    sock.bind(sockaddr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 98] Address already in use

Any ideas how to remedy this?
Many thanks,

Matt

Albums appear multiple times

If I browse by artist, I can see some albums several times only with a number appended.
or example, try browsing to Amaranthe.
You can see:
Maximalism
Maximalism2
Maximalism3
They are all the same albums. Could you please remove such duplicates?

Your Music/Songs "playlist" is out of order.

All of the songs that I have added my "My Songs" in Spotify are ordered by date. They aren't this way when pulled up in MPD (ncmpcpp). It would be nice if they are ordered the same way that they are in Spotify.

Opening some artists crashes MPD client

Hi,
I really like your plugin, it provides features which are not provided by other mopidy spotify plugin. But I encounter a problem while accessing albums of some artists with GMPC MPD client. For example artist Yiruma. I try to list his albums through Spotify-web -> Your artists -> Yiruma, but GMPC always crashes. I attach the log created by Mopidy. The problem occurs near end before Mopidy is shut down.
mopidy.txt

Authentication Problem

When I try to start Mopidy I get the following error-message:
"Did not receive authentication token!"

how can i solve this?

Spotify playlists support

Hi,

Thank you for this plugin, its awesome. The only issue I've got is playlist integration.
Not sure if that's the problem with my configuration or something else but it is not possible to add songs to Spotify playlist.
When I'm trying to add song to existing Spotify playlist Mopidy displays error message:

MPD: Playlist with scheme "spotify" can't store track scheme "spotify"

I can create a new playlist but it is not synchronized with Spotify.

Is there any solution for that?

Cheers,
Pawel

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.