This project is a fork of the original ympd
. It seems the original has been abandoned; the last commit dates back to 2018 and numerous pull requests are ignored.
Fig: Comparison between the original ympd (left) and this ympd++ (right). |
We use customized
branch as the main branch and keep master
branch untouched.
This builds the project and starts ympd
in the foreground.
$ ./build.sh
This builds the project and installs ympd
.
$ ./build.sh --install
See README_original.md.
- Raspbian Buster on Raspberry Pi 3
- Raspbian Buster on Raspberry Pi 3
-
Firefox on Arch Linux
-
Firefox on Android
-
Backward-Incompatible Changes
-
Keyboard Seek
-
Dark Mode
-
Informative Page Title
-
Cover Art Display
- ← and → were used to go to the previous/next song, but now the keyboard bindings are changed to h and l respectively.
You can seek the current song for seek_length
seconds
-
with ← and → keys
-
or by clicking
←
/→
buttons (see the figure below).
The default value of seek_length
is 5
and it can be increased/decreased
-
with ↑ and ↓ keys
-
or by clicking the button in which the value of
seek_length
is displayed (see the figure below).
Fig: Buttons for seeking. The numbered buttons are newly added. |
Dark mode is implemented and is enabled by default. You can toggle it by pressing D (i.e. Shift + d).
Fig. Non dark mode. | Fig. Dark mode. |
Now the page title is dynamically updated to the information of the current song. This is related to Issue 128.
Fig: Page title with song information. |
If cover_ympd.jpg
file exists under the same directory in which the current song resides, it is displayed as a cover art. When you move to a different song, of course, the cover art display is automatically updated. See the figure below.
-
The feature is disabled by default since it isn't very stable now. To enable it, change the value of
SHOULD_ENABLE_COVER_ART
macro to1
insrc/mpd_client.c
. -
The
mpd
'smusic_directory
, which is normally set in/etc/mpd.conf
, shall be/media/MUSIC/
. If you'd like to use another directory, change the value of the macro__MPD_MUSIC_DIRECTORY
insrc/mpd_client.h
and rebuild. This limitation comes from the fact thatmpd_song_get_uri()
returns a path relative tomusic_directory
. -
As described above, the name of cover arts shall be
cover_ympd.jpg
. And it is recommended they are small in size (e.g.<= 1MB
) for a speedy operation. We supplyhelper_scripts/create_cover_art.sh
script to recursively createcover_ympd.jpg
files fromcover.jpg
andcover.png
in the specified directory. Note it needsimagemagick
. Usage:
$ cd helper_scripts && ./create_cover_art.sh <directory>
ympd
server communicates with a browser using WebSockets. To update information such as a song's title, the artist's name, etc., they are sent as a JSON string. We extend this implementation to incorporate a base64-encoded image file into the string.
Fig. Cover art display. | Fig. Another example of cover art display. |
- Cover art display is unstable when
ympd
is accessed from multiple browsers at the same time. We cannot identify the cause yet. Current workaround: just reload the page.