cyp/README.md

70 lines
2.2 KiB
Markdown
Raw Permalink Normal View History

2019-04-16 14:40:16 +08:00
# CYP: Control Your Player
CYP is a web-based frontend for [MPD](https://www.musicpd.org/), the Music Player Daemon. You can use it to control the playback without having to install native application(s). It works in modern web browsers, both desktop and mobile.
2019-04-16 19:00:59 +08:00
## Screenshots
2019-04-23 18:31:01 +08:00
![](misc/screen1.png) ![](misc/screen2.png)
2019-04-16 15:03:42 +08:00
2019-04-16 19:00:59 +08:00
2019-04-16 14:40:16 +08:00
## Features
- Control the playback, queue, volume
- Save and load playlists
- Browse the library by artists/albums/directories
- Display album art via native MPD calls (no need to access the library; requires MPD >= 0.21)
2019-04-16 19:01:27 +08:00
- [Youtube-dl](https://ytdl-org.github.io/youtube-dl/index.html) integration
- Dark/Light themes
2019-04-16 14:40:16 +08:00
2019-04-16 15:03:42 +08:00
2019-04-16 14:40:16 +08:00
## Installation
2019-05-13 22:29:05 +08:00
Make sure you have a working MPD setup first and Node version >= 10
2019-04-16 14:40:16 +08:00
```sh
git clone https://github.com/ondras/cyp.git && cd cyp
npm i
node .
```
2019-10-01 21:36:39 +08:00
Point your browser to http://localhost:8080 to open the interface. Specify a custom MPD address via a `server` querystring argument (`?server=localhost:6655`).
2019-04-16 14:40:16 +08:00
2019-10-28 18:41:14 +08:00
## Instalation - Docker
Alternatively, you can use Docker to run CYP.
```sh
git clone https://github.com/ondras/cyp.git && cd cyp
docker build -t cyp .
docker run --network=host cyp
```
2019-10-29 15:49:04 +08:00
## Youtube-dl integration
You will need a working [youtube-dl](https://ytdl-org.github.io/youtube-dl/index.html) installation. Audio files are downloaded into the `_youtube` directory, so make sure it is available to your MPD library (use a symlink).
If you use Docker, you need to mount the `_youtube` directory into the image:
```sh
docker run --network=host -v "$(pwd)"/_youtube:/cyp/_youtube cyp
```
## Changing the port
...is done via the `PORT` environment variable. If you use Docker, the `-e` switch does the trick:
```sh
docker run --network=host -e PORT=12345 cyp
```
2019-04-16 15:03:42 +08:00
2019-04-16 14:40:16 +08:00
## Technology
- Connected to MPD via WebSockets (using the [ws2mpd](https://github.com/ondras/ws2mpd/) bridge)
2019-04-16 15:03:42 +08:00
- Token-based access to the WebSocket endpoint (better than an `Origin` check)
2020-03-28 04:41:47 +08:00
- Written using [*Custom Elements*](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements)
2019-04-16 14:40:16 +08:00
- Responsive layout via Flexbox
2019-04-16 15:03:42 +08:00
- CSS Custom Properties
2019-04-16 14:40:16 +08:00
- SVG icons (Material Design)
2020-03-28 04:36:20 +08:00
- Can spawn Youtube-dl to search/download audio files
2019-04-16 15:03:42 +08:00
- Album art retrieved directly from MPD (and cached via localStorage)