Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
ccb0a06
Moving stuff around into submodules; Refactoring of imports
ValentijnvdBeek Aug 15, 2018
16fb8e1
Add a player abstract class and divorce VLC from the internals
ValentijnvdBeek Aug 15, 2018
890e51b
Properly exit gtk and listen to the x_hotkeys config option
ValentijnvdBeek Aug 15, 2018
91681ac
An implementation of MPRIS2 to replace keybinder and change some gett…
ValentijnvdBeek Aug 16, 2018
03485bf
Update README
ValentijnvdBeek Aug 19, 2018
62786c1
Added actions to OSD
ValentijnvdBeek Aug 21, 2018
98a7f6b
Broke up gp.py and changed some getter/setters to properties
ValentijnvdBeek Aug 25, 2018
a753c24
I'm Feeling Lucky station
ValentijnvdBeek Aug 25, 2018
dbd628c
Artist & Album view
ValentijnvdBeek Sep 1, 2018
3514ba2
Only show artists with songs in the library
ValentijnvdBeek Sep 9, 2018
0fbb5fb
Added MPV player class & made player class selection configurable.
and3rson Sep 10, 2018
1d2ba76
Added MPV player class & made player class selection configurable.
and3rson Sep 10, 2018
48736b1
Cleanup.
and3rson Sep 12, 2018
fad5f9d
Fixed cover art images format for OSD.
and3rson Sep 12, 2018
e4ed9b9
Minor tweaks to MPRIS2 & MPV driver.
and3rson Sep 12, 2018
3401b52
WIP: MPRIS2 for MPV
and3rson Sep 12, 2018
e2c51d4
Fix for microseconds.
and3rson Sep 12, 2018
e0e1314
Fixed typos.
and3rson Sep 12, 2018
1434ae0
Merge branch 'porcelain' of https://github.com/and3rson/clay into por…
ValentijnvdBeek Sep 18, 2018
2e72f5d
Generalize pages and their keybinds
ValentijnvdBeek Sep 18, 2018
480f92a
Only perform signals being received from a notification owned by clay
ValentijnvdBeek Sep 18, 2018
3059c6f
Append songs on activate in search & library views
ValentijnvdBeek Sep 18, 2018
2ab5aaf
Fixed library tracks not playing
agg23 Sep 19, 2018
6088849
Merge pull request #42 from agg23/LibraryUUIDFix
ValentijnvdBeek Sep 19, 2018
3b91f04
Documentation changes
ValentijnvdBeek Sep 20, 2018
40928f9
Overhaul songlist searches
ValentijnvdBeek Sep 21, 2018
af183b4
Fix #47: add an explicit search mode
ValentijnvdBeek Sep 21, 2018
77349dd
Fixed #43: Queue does not move to the next track
agg23 Sep 22, 2018
2cb9823
Fixed #37: Prevent crash setting up dbus without a notification target
agg23 Sep 20, 2018
96d09bb
Merge pull request #41 from agg23/DbusNotificationFix
ValentijnvdBeek Sep 23, 2018
fc47df5
Merge pull request #44 from agg23/QueueNextTrackFix
ValentijnvdBeek Sep 23, 2018
5620e79
Use slugs instead of names; Backup commands; Filter on search & setti…
ValentijnvdBeek Sep 24, 2018
df0e05b
Configuration bugfixes
ValentijnvdBeek Oct 3, 2018
ea23af1
Cleanup the Track id code
ValentijnvdBeek Oct 7, 2018
daf66eb
Add playcount incrementation
vale981 Oct 7, 2018
c3000ca
Use the promoted songs call for liked store songs and supplement it w…
ValentijnvdBeek Oct 9, 2018
b6025b7
Add the MPRIS2 TrackList protocol
ValentijnvdBeek Nov 8, 2018
53e6bf5
Add Pillow to README
and3rson Dec 10, 2018
065a49c
Add an album view mode
ValentijnvdBeek Jan 2, 2019
24dbc62
Only show library added albums
ValentijnvdBeek Jan 2, 2019
5b98391
Rewrite AllSongs so it loads faster
ValentijnvdBeek Jan 3, 2019
f3c5877
Fixes uploaded songs, queue clearing, playerctl; Adds OSD option.
ValentijnvdBeek Jan 8, 2019
3302265
Fix the setup script
ValentijnvdBeek Feb 18, 2019
2e01f8f
Queue repeating and UI fixes
ValentijnvdBeek Feb 18, 2019
861bfb5
Fix #55
guitmz Apr 27, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
A short description of what the issue is.

## Expected Behaviour

## Actual Behaviour

## Steps to Reproduce

1.
2.
3.

## Specifications
- Version of Clay: 2.0.0
- Python version:
- OS Type/version:
- VLC version: NA
- MPV version: NA

## Screenshots
Add screenshots if applicable
11 changes: 11 additions & 0 deletions .github/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
If applicable, a description of what problem or issue promoted you to begin with.

# Your proposed solution/feature
The way you would like us to solve this issue or how you would like
the feature to work.

# Alternatives
Any alternative features or solutions you considered

# Additional context
Any other context, screenshots or mockups.
10 changes: 10 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
**REMINDER: Please read our [contribution guidelines!](../CONTRIBUTING.rst)**

Fixes #

# Description
A description of what merge request changes

-
-
-
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
language: python
matrix:
include:
- python: 2.7
env: TOXENV=py27
- python: 3.6
env: TOXENV=py36
before_install:
Expand All @@ -12,4 +10,3 @@ install:
- "pip install tox radon"
script:
- "tox"

36 changes: 25 additions & 11 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,36 +1,50 @@
Changelog
---------

Clay 1.2.0
Clay 2.0.0
==========

TBA

* Support the MPRIS2 protocol
* Remove X keybinds and drop the Gtk dependency
* Artist and Album view
* Notification actions
* libmpv support
* Rework of the internals
* Enter appending songs in library or search view
* Dropping of x keybinds
* Add playcount incrementation (by @vale981)
* Fix #37: clay crashing without a running notification daemon (by @agg23)
* Fix #38: no tracks displaying (by @agg3)
* Fix #43: queue doesn't move to the next track (by @agg23)
* Fix #55: Unsafe load() call disabled by Gentoo (by @guitmz)

Clay 1.1.0
==========

2018-08-09

* Liked Songs Playlist (by Valentijn)
* Thumbs Up / Thumbs Down (by Valentijn)
* Alphabetical Sorting in Library View (by Valentijn)
* Explicit Rating Icon (by Valentijn)
* Liked Songs Playlist
* Thumbs Up / Thumbs Down
* Alphabetical Sorting in Library View
* Explicit Rating Icon
* OSD notifications
* setproctitle to nicely display clay in process list
* Various bugfixes
* Fix #29 (customizable tab activation hotkeys)
* Fix #31 (rating issues)
* Fix #29: customizable tab activation hotkeys
* Fix #31: rating issues

Clay 1.0.0
==========

2018-04-06

* Configurable keybinds (by Valentijn)
* Configurable colors (by Valentijn)
* Pluggable X keybinds (by Valentijn)
* Configurable keybinds
* Configurable colors
* Pluggable X keybinds
* "My stations" page (by @Fluctuz)
* Better settings management (by Valentijn)
* Better settings management
* Equalizer
* Track caching indicator
* Optimized settings & cache
Expand Down
52 changes: 52 additions & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
How to contribute to Clay
======

Bugs
####

Reporting bugs
****
- Please read the `README`_ carefully.
- Search our `Github issues`_
to see whether it already has been reported.
- Follow the relevant template.

Feature request
****
Feature requests are always welcome but do keep in mind that it might
take a very long time (or maybe forever!) until we get to it.

Did you write a patch that fixes a bug?
****
- File a relevant issue if one doesn't already exist
- Open a new pull request with the patch
- Ensure the PR description describes the problem
- Follow the code guidelines

Any questions
****
Feel free to ask any questions on our irc channel:

- Server: irc.oftc.net
- Channel: **#clay**

Code guidelines
####

Python guidelines
****
- Please follow `PEP 8`_
- Write docstrings using the `Google Style Docstrings`_
- Bare exceptions should be avoided

Git guidelines
****
- Make sure that every commit functions an standalone unit.
- Commit messages need to be descriptive
- Pull requests that only change cosmetics will probably be denied.
- Run a linter before commiting

.. _README: README.md
.. _Github issues: https://github.com/and3rson/Clay/issues
.. _PEP 8: https://www.python.org/dev/peps/pep-0008/
.. _Google Style Docstrings: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
* [Equalizer](#equalizer)
* [Misc](#misc)
- [Troubleshooting](#troubleshooting)
- [Contributing](./CONTRIBUTING.rst)
- [Credits](#credits)
- [Changelog](./CHANGELOG.rst)

Expand All @@ -27,7 +28,7 @@

Standalone command line player for Google Play Music.

This app wouldn't be possible without the wonderful [gmusicapi] and [VLC] libraries.
This app wouldn't be possible without the wonderful [gmusicapi] and [VLC] & [MPV] libraries.

This project is neither affiliated nor endorsed by Google.

Expand All @@ -49,7 +50,8 @@ Click the image below to see the screencast:
# Quick start

```bash
sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo vlc keybinder python-keybinder
sudo apt install python-gi python-gi-cairo python3-gi python3-gi-cairo
vlc
pip install --user clay-player
clay
```
Expand All @@ -61,31 +63,31 @@ Documentation is [available here](http://clay.readthedocs.io/en/latest/).
# Requirements

- Python 3.x (native)
- [gmusicapi] (PYPI)
- [urwid] (PYPI)
- [PyYAML] (PYPI)
- lib[VLC] (native, distributed with VLC player)
- [PyGObject] (optional) (native, used for global X keybinds)
- [Keybinder] (optional) (native, used for global X keybinds)
- [setproctitle] (optional) PYPI, used to change clay process name from 'python' to 'clay')
- python-dbus (optional)
- [gmusicapi] (PyPI)
- [urwid] (PyPI)
- [PyYAML] (PyPI)
- lib[VLC] (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

# What works
- Audio equalizer
- Caching (not for song data, that one is coming soon)
- Configurable keybinds and colours
- Configuration UI
- Filtering results
- Global hotkeys
- Global hotkeys (via MPRIS2/DBus)
- Like/dislike tracks
- Liked songs playlist
- Music library browsing & management
- Notifications - in-app & OSD (via DBus)
- PYPI package
- 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
Expand All @@ -96,20 +98,11 @@ Documentation is [available here](http://clay.readthedocs.io/en/latest/).
- Artist/album search
- Other functionality that is supported by [gmusicapi]
- Playlist editing
- Different playback transports

# Installation

**Warning:** The AUR and PyPy packages called `python3-keybinder` will
not work with Clay since you need to use the official bindings. Since
Ubuntu seperated the official bindings into a different package but
with the same name as the unofficial one it can cause some
confusion. So if you get a `Namespace Keybinder not available` warning
it is probably caused by this. So, for example, on Arch Linux you need
the `libkeybinder3` package instead.

1. Install Python 3, and VLC from your package manager.
2. Optionally, you can install PyGObject, DBus for Python and keybinder plus bindings
if you want global X keybinds.
1. Install Python 3, pydbus, PyGObject, and VLC or MPV from your package manager.

## Method 1 (PyPi, automatic)

Expand Down Expand Up @@ -170,12 +163,24 @@ Here's how you do it:

You *should* get the sound working. Also docker will reuse the Clay config file from host (if you have one).

# Remote control
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.

# Configuration

- 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`) in `clay_settings` section:

```yaml
# ...
clay_settings:
player_class: clay.playback.mpv:MPVPlayer
# ...
```

# Controls

Expand All @@ -186,7 +191,8 @@ You *should* get the sound working. Also docker will reuse the Clay config file

## Songs

- `<ENTER>` - play highlighted track
- `<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
Expand All @@ -213,12 +219,6 @@ You *should* get the sound working. Also docker will reuse the Clay config file
- `<CTRL> x` - exit app
- To filter songs just start typing words. Hit `<ESC>` to cancel.

## X keybinds
**NOTE:** you need to pass the `--with-x-keybinds` flag for these to work
- `<XF86AudioPlay>` - play/pause the song
- `<XF86AudioNext>` - play the next song
- `<XF86AudioPrev>` - play previous song

# Troubleshooting

At some point, the app may fail. Possible reasons are app bugs,
Expand All @@ -241,13 +241,19 @@ Regards to [gmusicapi] and [VLC] who made this possible.
People who contribute to this project:

- [@ValentijnvdBeek (Valentijn)](https://github.com/ValentijnvdBeek)
- [@Vale981 (Valentin Boettcher)](https://github.com/vale981)
- [@Fluctuz](https://github.com/Fluctuz)
- [@sjkingo (Sam Kingston)](https://github.com/sjkingo)
- [@agg23 (Adam Gastineau)](https://github.com/agg23)
- [@guitmz (Guilherme Thomazi Bonicontro)][https://github.com/guitmz]

[gmusicapi]: https://github.com/simon-weber/gmusicapi
[VLC]: https://wiki.videolan.org/python_bindings
[MPV]: https://mpv.io/
[urwid]: http://www.urwid.org/
[pyyaml]: https://github.com/yaml/pyyaml
[PyGObject]: https://pygobject.readthedocs.io/en/latest/getting_started.html
[Keybinder]: https://github.com/kupferlauncher/keybinder
[setproctitle]: https://pypi.org/project/setproctitle/
[pydbus]: https://github.com/LEW21/pydbus
[Pillow]: https://pillow.readthedocs.io/en/5.3.x/
Loading