2017-12-28 15:09:40 +02:00
|
|
|
# Clay [alpha]
|
|
|
|
|
2018-01-06 14:06:25 +02:00
|
|
|
[](https://travis-ci.org/and3rson/clay) [](http://clay.readthedocs.io/en/latest/?badge=latest)
|
2018-01-06 02:03:28 +02:00
|
|
|
|
2017-12-28 15:09:40 +02:00
|
|
|
Standalone command line player for Google Play Music.
|
|
|
|
|
|
|
|
This app wouldn't be possible without the wonderful [gmusicapi] and [VLC] libraries.
|
|
|
|
|
|
|
|
This project is neither affiliated nor endorsed by Google.
|
|
|
|
|
|
|
|
It's being actively developed, but is still in the early alpha version, so many features are missing and/or may be bugged.
|
|
|
|
|
2017-12-28 17:30:51 +02:00
|
|
|
(Click the image below to see the screencast.)
|
|
|
|
|
2018-01-24 16:21:34 +02:00
|
|
|
[](https://asciinema.org/a/69ygwYGRDyB5a7pFgyrwWo1ea)
|
2017-12-28 15:09:40 +02:00
|
|
|
|
2018-01-23 22:22:53 +02:00
|
|
|
# Installation
|
|
|
|
|
|
|
|
```bash
|
|
|
|
sudo pip install clay-player
|
|
|
|
clay
|
|
|
|
```
|
|
|
|
|
2018-01-06 14:06:25 +02:00
|
|
|
# Documentation
|
|
|
|
|
|
|
|
Documentation is .
|
|
|
|
|
2017-12-28 15:09:40 +02:00
|
|
|
# Requirements
|
|
|
|
|
|
|
|
- Python 3.x (native)
|
|
|
|
- [gmusicapi] (PYPI)
|
|
|
|
- [urwid] (PYPI)
|
2017-12-28 15:13:31 +02:00
|
|
|
- [PyYAML] (PYPI)
|
|
|
|
- lib[VLC] (native, distributed with VLC player)
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
# What works
|
|
|
|
- Playback
|
2018-01-14 17:26:57 +02:00
|
|
|
- Music library browsing & management
|
2017-12-28 15:09:40 +02:00
|
|
|
- Playlists
|
2018-01-03 13:36:32 +02:00
|
|
|
- Radio stations
|
2018-01-07 00:36:21 +02:00
|
|
|
- Song search
|
2018-01-14 20:14:56 +02:00
|
|
|
- Filtering results
|
2018-01-03 13:36:32 +02:00
|
|
|
- Queue management
|
|
|
|
- Notifications
|
2018-01-29 13:53:10 +02:00
|
|
|
- Audio equalizer
|
2018-01-07 00:36:21 +02:00
|
|
|
- Global hotkeys
|
2018-01-14 17:26:57 +02:00
|
|
|
- Configuration UI
|
|
|
|
- Token caching for faster authorizations
|
|
|
|
- Song operations (add to library, start station etc.)
|
|
|
|
- Caching (not for song data, that one is coming soon)
|
2018-01-29 13:53:10 +02:00
|
|
|
- PYPI package
|
2017-12-28 15:09:40 +02:00
|
|
|
|
2017-12-28 15:13:31 +02:00
|
|
|
# What is being developed
|
2017-12-28 15:09:40 +02:00
|
|
|
|
2018-01-07 00:36:21 +02:00
|
|
|
- Like/dislike tracks
|
|
|
|
- Playlist editing
|
|
|
|
- Artist/album search
|
2017-12-28 15:09:40 +02:00
|
|
|
- Other functionality that is supported by [gmusicapi]
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
|
|
|
0. Install Python 3 and VLC.
|
|
|
|
|
|
|
|
## Method 1 (automatic)
|
|
|
|
|
|
|
|
1. Source the 'activate.sh' script. It will initialize the Python virtual env and install the dependencies:
|
|
|
|
|
2017-12-28 15:11:16 +02:00
|
|
|
```bash
|
|
|
|
source activate.sh
|
|
|
|
```
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
2. Run the player:
|
|
|
|
|
2017-12-28 15:11:16 +02:00
|
|
|
```bash
|
2017-12-30 03:22:12 +02:00
|
|
|
./clay/app.py
|
2017-12-28 15:11:16 +02:00
|
|
|
```
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
## Method 2 (manual)
|
|
|
|
|
|
|
|
1. Create & activate virtualenv:
|
|
|
|
|
2017-12-28 15:11:16 +02:00
|
|
|
```bash
|
|
|
|
virtualenv .env
|
|
|
|
source .env/bin/activate
|
|
|
|
```
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
2. Install the requirements:
|
|
|
|
|
2017-12-28 15:11:16 +02:00
|
|
|
```bash
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
3. Run the player:
|
|
|
|
|
2017-12-28 15:11:16 +02:00
|
|
|
```bash
|
2017-12-30 03:22:12 +02:00
|
|
|
./clay/app.py
|
2017-12-28 15:11:16 +02:00
|
|
|
```
|
2017-12-28 15:09:40 +02:00
|
|
|
|
|
|
|
# Configuration
|
|
|
|
|
|
|
|
In order to use this app, you need to know your Device ID. Typically gmusicapi should display possible IDs once you type a wrong one.
|
|
|
|
Also be aware that this app has not been tested with 2FA yet.
|
|
|
|
|
|
|
|
# Controls
|
|
|
|
|
2018-01-03 13:36:32 +02:00
|
|
|
## General
|
|
|
|
|
2017-12-28 15:09:40 +02:00
|
|
|
- `<UP|DOWN|LEFT|RIGHT>` - nagivate around
|
|
|
|
- `<ALT> + 1..9` - switch active tab
|
2018-01-03 13:36:32 +02:00
|
|
|
|
|
|
|
## Songs
|
|
|
|
|
|
|
|
- `<ENTER>` - play highlighted track
|
2017-12-28 15:09:40 +02:00
|
|
|
- `<CTRL> w` - play/pause
|
|
|
|
- `<CTRL> e` - play next song
|
2018-01-03 13:36:32 +02:00
|
|
|
- `<CTRL> a` - append highlighted song to the queue
|
|
|
|
- `<CTRL> u` - remove highlighted song from the queue
|
|
|
|
- `<CTRL> p` - start station from highlighted song
|
2018-01-10 17:31:25 +02:00
|
|
|
- `<ALT> m` - show context menu for this song
|
2018-01-03 13:36:32 +02:00
|
|
|
|
|
|
|
## Playback
|
|
|
|
|
2017-12-28 15:09:40 +02:00
|
|
|
- `<CTRL> s` - toggle shuffle
|
|
|
|
- `<CTRL> r` - toggle song repeat
|
2018-01-03 13:36:32 +02:00
|
|
|
- `<SHIFT> <LEFT|RIGHT>` - seek backward/forward by 5% of the song duration
|
|
|
|
- `<CTRL> q` - seek to song beginning
|
|
|
|
|
|
|
|
## Misc
|
|
|
|
|
2018-01-04 18:29:57 +02:00
|
|
|
- `<ESC>` or `<CTRL> /` or <CTRL> _ - close most recent notification
|
2018-01-03 13:36:32 +02:00
|
|
|
- `<CTRL> x` - exit app
|
2017-12-28 15:09:40 +02:00
|
|
|
|
2018-01-31 11:23:25 +02:00
|
|
|
# Troubleshooting
|
|
|
|
|
|
|
|
At some point, the app may fail. Possible reasons are app bugs,
|
|
|
|
Google Play Music API issues, [gmusicapi] bugs, [urwid] bugs etc.
|
|
|
|
|
|
|
|
If you encounter a problem, please feel free to submit an .
|
|
|
|
I'll try to figure it out ASAP.
|
|
|
|
|
|
|
|
Most issues can be reproduced only with specific data coming from Google Play Music servers.
|
|
|
|
|
|
|
|
You can set `CLAY_DEBUG` environment variable to `1` before launching Clay player.
|
|
|
|
This will dump all Google API calls & responses to the `/tmp/clay-api-log.json` file.
|
|
|
|
|
|
|
|
You can attach this file when opening an issue here, but **keep in mind that
|
|
|
|
this file MAY contain some personal data, access tokens and/or Google account credentials
|
|
|
|
that may allow others to use your account**.
|
|
|
|
|
2017-12-28 15:09:40 +02:00
|
|
|
# Credits
|
|
|
|
|
|
|
|
Made by Andrew Dunai.
|
|
|
|
|
|
|
|
Regards to [gmusicapi] and [VLC] who made this possible.
|
|
|
|
|
|
|
|
[gmusicapi]: https://github.com/simon-weber/gmusicapi
|
|
|
|
[VLC]: https://wiki.videolan.org/python_bindings
|
|
|
|
[urwid]: urwid.org/
|
|
|
|
[pyyaml]: https://github.com/yaml/pyyaml
|
|
|
|
|