- About
- Quick start
- Documentation
- Requirements
- What works
- What is being developed
- Installation
- Configuration
- Controls
- Troubleshooting
- Contributing
- Credits
- Changelog
Standalone commandline player for Google Play Music and, possibly, Youtube Music.
This app wouldn't be possible without the wonderful gmusicapi and VLC & MPV libraries.
This project is neither affiliated nor endorsed by Google.
This is a friendly fork from the original made by the amazing Andrew Dunai to make it easier to bigger decisions until he is able to actively work on it again. You can find the original at and3rson/clay.
This project is still under development so there are plenty of missing features and at least a few bugs.
Join us over at Andrew's IRC!
- Server: irc.oftc.net
- Channel: #clay
Screenshot:
Click the image below to see the screencast:
sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo
vlc
pip install --user clay-player
clay
Documentation is available here.
- Python 3.x (native)
- gmusicapi (PyPI)
- urwid (PyPI)
- PyYAML (PyPI)
- libVLC (native, distributed with VLC player) OR libMPV (native, distributed with MPV)
- setproctitle (optional) PyPI, used to change clay process name from 'python' to 'clay')
- pydbus (PyPI)
- Pillow (PyPI, optional) used to resize album art before displaying it in notifications
- Audio equalizer
- Caching (not for song data, that one is coming soon)
- Configurable keybinds and colours
- Configuration UI
- Filtering results
- Global hotkeys (via MPRIS2/DBus)
- Like/dislike tracks
- Liked songs playlist
- Music library browsing & management
- Notifications - in-app & OSD (via DBus)
- PyPI package
- Playback
- Playlists
- Queue management
- Radio stations
- I'm Feeling Lucky station
- Song file caching
- Song operations (add to library, start station etc.)
- Song search
- Token caching for faster authorizations
- Artist/album display
- Artist/album search
- Other functionality that is supported by gmusicapi
- Playlist editing
- Different playback transports
- Install Python 3, pydbus, PyGObject, and VLC or MPV from your package manager.
Just install the player using pip
:
pip install --user clay-player
clay
-
Clone the source code.
-
Create & activate virtualenv with system packages:
virtualenv --system-site-packages --prompt="(clay) " .env source .env/bin/activate
-
Install the requirements:
pip install -r requirements.txt
-
Run the player:
./clay/app.py
Sometimes you want to run stuff in Docker. You can run Clay in docker as well.
There are two strict requirements:
- You need to build the container by yourself (bacause of PulseAudio related paths & magic cookies.)
- You must have PulseAudio running on host with
module-native-protocol-tcp
module enabled.
Here's how you do it:
-
Clone the source code
-
Create "~/.config/clay" directory (to have proper volume permissions in docker)
mkdir ~/.config/clay
-
Build & run the image
make run
You should get the sound working. Also docker will reuse the Clay config file from host (if you have one).
Clay supports the MPRIS2 protocol which allows users to remote control their Clay instances using generic tools like [playerctl]. This replaces the old X Hotkeys systems but does require you to manually bind the keys to your windowing system of choice.
-
Once you launch the app, use the "Settings" page to enter your login and password.
-
You will also need to know your Device ID. Thanks to gmusicapi, the app should display possible IDs once you enter a wrong one.
-
Please be aware that this app has not been tested with 2FA yet.
-
For people with 2FA, you can just create an app password in Google accounts page and proceed normally. (Thanks @j605)
-
By default VLC is used. If you want to use MPV instead, add the following line to your Clay config file (
~/.config/clay/config.yaml
) inclay_settings
section:# ... clay_settings: player_class: clay.playback.mpv:MPVPlayer # ...
<UP|DOWN|LEFT|RIGHT>
- nagivate around<ALT> + 0..9
- switch active tab
<ENTER>
- add highlighted track to the queue<CTRL> p
- start or pause the queue<CTRL> w
- play/pause<CTRL> e
- play next song<CTRL> a
- append highlighted song to the queue<CTRL> u
- remove highlighted song from the queue<CTRL> p
- start station from highlighted song<ALT> m
- show context menu for this song<ALT> u
- thumb up the highlighted song<ALT> d
- thumb down the highlighted song
<CTRL> s
- toggle shuffle<CTRL> r
- toggle song repeat<SHIFT> <LEFT|RIGHT>
- seek backward/forward by 5% of the song duration<CTRL> q
- seek to song beginning
<ESC>
or<CTRL> /
or _ - close most recent notification or popup<CTRL> x
- exit app- To filter songs just start typing words. Hit
<ESC>
to cancel.
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 issue. We'll try to figure it out ASAP.
Most issues can be reproduced only with specific data coming from Google Play Music servers.
Use "Debug" tab within app to select the error and hit "Enter" to copy it into clipboard. This will help us to investigate this issue.
The original is made by Andrew Dunai.
Currently developed by Valentijn van de Beek
Regards to gmusicapi and VLC who made this possible.
People who contribute to this project:
- @and3rson (Andrew Dunai)
- @ValentijnvdBeek (Valentijn)
- @Vale981 (Valentin Boettcher)
- @Fluctuz
- @sjkingo (Sam Kingston)
- @agg23 (Adam Gastineau)
- [@guitmz (Guilherme Thomazi Bonicontro)][https://github.com/guitmz]