GithubHelp home page GithubHelp logo

spotify-helper's Introduction

spotify-helper

Provides various utility methods to interact with Spotify, mostly through the ability to assign keyboard shortcuts to most Spotify functions. These are editable in the bindings.txt file. Run spotify_helper.py with python 3 to start the script (has to be run as sudo on macOS for keyboard access). This version is behind as I have now set-up a server that makes the Web API authentication much easier - to get the client for this go here.

The program first tries to directly interact with the Spotify client (unavailable on Windows), and then falls back on using the Web API; some methods are only available using the Web API.

Since the Web API is always needed, Spotify developer API keys are required: in the src/keys.txt file, replace the placeholders on the first & second lines with your client id & client secret. They can be obtained from making an API application here. Additionally, in the application dashboard, go to 'Edit Settings', and set the redirect URI to 'http://localhost:8888/callback'

On first run, a browser window should open asking for your Spotify accounts' permission to let the app handle parts of your account - after accepting, the url should point to localhost, with a single code parameter: copy its value into the commandline (which should be awaiting input). From then on, nothing other than starting up the script should be required.

Dependencies

To install all the dependencies needed, find the appropriate requirements text file for your OS in requirements/, and run:

pip install -r requirements.txt

General dependencies

  • Requests - to communicate easily with the Spotify API service.
  • pynput - to read keyboard input regardless of platform.

Windows-specific dependencies

  • pywin32 - to be able to send notifications on Windows.

Linux-specific dependencies

  • dbus-python - to be able to interact with the Spotify client. This dependency should already be installed on most Linux systems, but if it isn't available, either install it from PyPI (pip install dbus-python) or, if you are using a virtual environment, copy the dbus python files from your system into the virtual environment's lib folder (as described here).

spotify-helper's People

Contributors

platelminto avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

danbest21

spotify-helper's Issues

Use a library for notification sending

This project was partially meant to be a way to consolidate my python knowledge so a couple things that a library could've been used for were instead re-made. Now that I've learnt them I should move onto using an existing library for this.

Clear up README

Make the instructions in the README clearer, including screenshots for certain steps.

Package the program as an executable

Remove the need to require a python installation, or having to install requirements, etc, by distributing packaged apps for the 3 supported OSes.

Don't require the user to get their own API keys

Having the user make their own application in the Spotify developer dashboard and having to copy them in is overly complex, have to figure out how to hide personal API keys that all users can use (possibly connecting it to a website - see #9).

Add GUI interface

Make the program live as a tray icon, with a menu to open to change keybinds.

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.