Skip to main content

Simple tool to show Youtube music videos and lyrics for the playing Spotify songs

Project description

Spotify Music Videos

A simple tool to show Youtube music videos and lyrics for the currently playing Spotify songs with VLC.

example

How to install

You can use pip to install it easily:

pip3 install spotify-videos

Or download the latest release. Uncompress the .tar.gz file and run inside the folder:

python ./setup.py install

Note: you can add the --user flag to install it locally.

Compatibility

For Windows and Mac users, the Spotify Web API will be used. This means that:

  • You have to sign in and set it up manually
  • Only Spotify Premium users are able to use some functions
  • API calls are limited to 1 per second so there is more lag

How to obtain your client ID and your client secret:

  1. Go to the Spotify Developers Dashboard
  2. Create a new client ID. You can fill the descriptions as you like.
  3. Click No when asked if it's a commercial integration and accept the terms in the next step.
  4. Go to Edit Settings and type http://localhost:8888/callback/ in the Redirect URIs field.
  5. You can now copy your Client ID and Client Secret and add them when you call spotify-videos:
    • spotify-videos --username your_username --client-id your_client_id --client-secret your_client_secret

You may be prompted to paste the resulting link that was opened in your browser into the program. After doing it, the authorization process will be complete. The auth info should be kept in a cache file named .cache-[your_username]

How to use

You can use these flags to modify the behavior of the program:

usage: spotify-videos [-h] [-v] [--debug] [-n] [-f] [-a VLC_ARGS]
                          [--width MAX_WIDTH] [--height MAX_HEIGHT] [-w]
                          [--username USERNAME] [--client-id CLIENT_ID]
                          [--client-secret CLIENT_SECRET]
                          [--redirect-uri REDIRECT_URI]

Windows and Mac users must pass --username, --client-id and --client-secret to
use the web API. Read more about how to obtain them in the README
(https://github.com/marioortizmanero/spotify-music-videos).

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit.
  --debug               display debug messages
  -n, --no-lyrics       do not print lyrics
  -f, --fullscreen      play videos in fullscreen mode
  -a VLC_ARGS, --args VLC_ARGS
                        other arguments used when opening VLC. Note that some
                        like args='--fullscreen' won't work in here
  --width MAX_WIDTH     set the maximum width for the played videos
  --height MAX_HEIGHT   set the maximum height for the played videos
  -w, --use-web-api     forcefully use Spotify's web API
  --username USERNAME   your Spotify username. Mandatory if the web API is
                        being used. Example: --username='yourname'
  --client-id CLIENT_ID
                        your client ID. Mandatory if the web API is being
                        used. Check the README to see how to obtain yours.
                        Example: --client-
                        id='5fe01282e44241328a84e7c5cc169165'
  --client-secret CLIENT_SECRET
                        your client secret ID. Mandatory if the web API is
                        being used. Check the README to see how to obtain
                        yours. Example: --client-
                        secret='2665f6d143be47c1bc9ff284e9dfb350'
  --redirect-uri REDIRECT_URI
                        the redirect URI for the web API. Not necessary as it
                        defaults to 'http://localhost:8888/callback/'

Current limitations:

  • Spotify doesn't currently (15/07/19) support the MPRIS property Position so the starting offset is calculated manually and may be a bit rough.
  • To configure the maximum size of VLC's window a GUI would need to be implemented, like tkinter. The project would be much less minimal that way, but more features could be implemented, like lyrics inside the GUI.
  • Spotify's Web API doesn't allow function calls on updates like Dbus, meaning that the metadata has to be manually updated every second and checked in case of changes.

Documentation

Helpful documentation links for contributing:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spotify-videos-1.4.1.tar.gz (8.4 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spotify_videos-1.4.1-py3.7.egg (16.4 kB view details)

Uploaded Egg

spotify_videos-1.4.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file spotify-videos-1.4.1.tar.gz.

File metadata

  • Download URL: spotify-videos-1.4.1.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for spotify-videos-1.4.1.tar.gz
Algorithm Hash digest
SHA256 a266c3378bf21753b16bcc2c2e7461596aa0d86ed727f05544d882bf3a66aecc
MD5 09a18e2b63c651a7c244a631446ddfac
BLAKE2b-256 298e46535972690b5504f5edd19676f8960e6ad9f0d99005e5676f492d370bc4

See more details on using hashes here.

File details

Details for the file spotify_videos-1.4.1-py3.7.egg.

File metadata

  • Download URL: spotify_videos-1.4.1-py3.7.egg
  • Upload date:
  • Size: 16.4 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for spotify_videos-1.4.1-py3.7.egg
Algorithm Hash digest
SHA256 13a2ed66bbd48598a275fb415311f0d093f0c6a00f711b21493f1b64c06b87b1
MD5 ab6f7431c6eeed16f025dbabf43c6733
BLAKE2b-256 30af5fb66308ad2f8c35841a904ffb1314ed8b60d1bc4f5aa847401db9bc5142

See more details on using hashes here.

File details

Details for the file spotify_videos-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: spotify_videos-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for spotify_videos-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a4fe8240e38075c782756a4170ce51a845dc91ac74d348e4e76bee980c5854e8
MD5 a2c2d5524056564961b900b1b1642825
BLAKE2b-256 04e4c5a18c16ccdc0dce7bd4e1481f906d82e25efe12f5e9cf823e431ee46c55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page