-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from jcorporation/devel
Enable PWA Feature
- Loading branch information
Showing
25 changed files
with
599 additions
and
260 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,35 @@ | ||
myMPD | ||
==== | ||
===== | ||
|
||
myMPD is a lightweight MPD web client that runs without a dedicated webserver or interpreter. | ||
It's tuned for minimal resource usage and requires only very litte dependencies. | ||
myMPD is a fork of ympd. | ||
myMPD is a fork of ympd (https://github.com/notandy/ympd). | ||
|
||
This fork provides a reworked ui based on Bootstrap 4 and a modernized backend. | ||
|
||
Design principles: | ||
- Keep it small and simple | ||
- Uses only mpd as source of truth | ||
- Mobile first UI | ||
- Keep security in mind | ||
|
||
Featurelist: | ||
- Browse mpd database by artist | ||
- Browse filesystem and playlists | ||
- Queue management | ||
- Advanced search | ||
- Progressiv Web App enabled | ||
- Local coverart support | ||
|
||
myMPD is work in progress. Bugreportes and feature requests are very welcome. Please use the issues function from github (https://github.com/jcorporation/myMPD/issues). | ||
Planed functions are managed in a github project (https://github.com/jcorporation/myMPD/projects/1). | ||
|
||
![image](https://jcgames.de/stuff/myMPD/screenshots.gif) | ||
|
||
UI Components | ||
------------- | ||
- Bootstrap 4: https://getbootstrap.com/ | ||
- Material Design Icons: https://material.io/tools/icons/?style=baseline | ||
- Material Design Icons: https://material.io/tools/icons/ | ||
- Bootstrap Native: http://thednp.github.io/bootstrap.native/ | ||
|
||
Backend | ||
|
@@ -24,32 +41,45 @@ Dependencies | |
------------ | ||
- libmpdclient 2: http://www.musicpd.org/libs/libmpdclient/ | ||
- cmake 2.6: http://cmake.org/ | ||
- OpenSSL: https://www.openssl.org/ | ||
|
||
Unix Build Instructions | ||
----------------------- | ||
|
||
1. install dependencies. cmake and libmpdclient (dev) are available from all major distributions. | ||
2. build and install it ```cd /path/to/src; ./mkrelease.sh``` | ||
3. Link your mpd music directory to ```/usr/share/mympd/htdocs/library``` and put ```folder.jpg``` files in your album directories | ||
4. Configure your mpd with http stream output to use the local player | ||
1. Install dependencies: cmake, libmpdclient (dev) and OpenSSL (dev) are available from all major distributions. | ||
2. Build and install: ```cd /path/to/src; ./mkrelease.sh```. | ||
3. Link your mpd music directory to ```/usr/share/mympd/htdocs/library``` and put ```folder.jpg``` files in your album directories (mkrelease.sh tries to do this for you). | ||
4. Configure your mpd with http stream output to use the local player. | ||
|
||
Run flags | ||
--------- | ||
``` | ||
Usage: ./mympd [OPTION]... | ||
-h, --host <host> connect to mpd at host [localhost] | ||
-p, --port <port> connect to mpd at port [6600] | ||
-h, --mpdhost <host> connect to mpd at host [localhost] | ||
-p, --mpdport <port> connect to mpd at port [6600] | ||
-m, --mpdpass <password> specifies the password to use when connecting to mpd | ||
-w, --webport <port> listen port for webserver [80] | ||
-S, --ssl enable ssl | ||
-W, --sslport <port> listen port for ssl webserver [443] | ||
-C, --sslcert <filename> filename for ssl certificate [/etc/mympd/ssl/server.pem] | ||
-K, --sslkey <filename> filename for ssl key [/etc/mympd/ssl/server.key] | ||
-s, --streamport <port> connect to mpd http stream at port [8000] | ||
-u, --user <username> drop priviliges to user after socket bind | ||
-m, --mpdpass <password> specifies the password to use when connecting to mpd | ||
-i, --coverimage <filename> filename for coverimage [folder.jpg] | ||
-t, --statefile <filename> filename for mympd state [/var/lib/mympd/mympd.state] | ||
-v, --version get version | ||
--help this help | ||
``` | ||
|
||
SSL | ||
--- | ||
|
||
1. Create ca and certificate ```/path/to/src/contrib/crcert.sh``` (mkrelease.sh do this for you). | ||
2. Start myMPD with ```-S``` (use default certificate under ```/etc/mympd/ssl/```). | ||
3. Import ```/etc/mympd/ssl/ca/ca.pem``` in your browser to trust the certificate. | ||
4. myMPD redirects http requests to https, ensure that myMPD hostname is resolvable. | ||
|
||
Copyright | ||
--------- | ||
ympd: 2013-2014 <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
#!/bin/sh | ||
|
||
if [ -d /etc/mympd/ssl ] | ||
then | ||
echo "SSL directory exists, to recreate certificates: \"rm -r /etc/mympd/ssl\"" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p /etc/mympd/ssl/ca/certs | ||
cd /etc/mympd/ssl/ca | ||
|
||
echo '01' > serial | ||
touch index.txt | ||
touch index.txt.attr | ||
|
||
echo "Creating ca" | ||
|
||
cat > ca.cnf << EOL | ||
[req] | ||
distinguished_name = root_ca_distinguished_name | ||
x509_extensions = root_ca_extensions | ||
prompt = no | ||
[root_ca_distinguished_name] | ||
O = myMPD | ||
CN = myMPD_CA | ||
[root_ca_extensions] | ||
basicConstraints = CA:true | ||
[ ca ] | ||
default_ca = mympd_ca | ||
[mympd_ca] | ||
dir = /etc/mympd/ssl/ca | ||
database = /etc/mympd/ssl/ca/index.txt | ||
new_certs_dir = /etc/mympd/ssl/ca/certs/ | ||
serial = /etc/mympd/ssl/ca/serial | ||
copy_extensions = copy | ||
policy = local_ca_policy | ||
x509_extensions = local_ca_extensions | ||
default_md = sha256 | ||
[ local_ca_policy ] | ||
commonName = supplied | ||
organizationName = supplied | ||
[ local_ca_extensions ] | ||
basicConstraints = CA:false | ||
EOL | ||
|
||
openssl req -new -x509 -newkey rsa:2048 -sha256 -days 3650 -nodes -config ca.cnf \ | ||
-keyout ca.key -out ca.pem | ||
|
||
HOSTNAME=$(hostname) | ||
FQDN=$(hostname -f) | ||
IP=$(getent hosts $HOSTNAME | awk {'print $1'}) | ||
|
||
cd /etc/mympd/ssl | ||
echo "Creating cert:" | ||
echo "\t$HOSTNAME" | ||
echo "\t$FQDN" | ||
echo "\t$IP" | ||
|
||
cat > req.cnf << EOL | ||
[req] | ||
distinguished_name = req_distinguished_name | ||
req_extensions = v3_req | ||
prompt = no | ||
[req_distinguished_name] | ||
O = myMPD | ||
CN = $FQDN | ||
[v3_req] | ||
basicConstraints = CA:FALSE | ||
keyUsage = digitalSignature, keyEncipherment, dataEncipherment | ||
extendedKeyUsage = serverAuth | ||
subjectAltName = @alt_names | ||
[alt_names] | ||
DNS.1 = $HOSTNAME | ||
DNS.2 = $FQDN | ||
DNS.3 = localhost | ||
IP.1 = $IP | ||
IP.2 = 127.0.0.1 | ||
EOL | ||
|
||
openssl req -new -sha256 -newkey rsa:2048 -days 3650 -nodes -config req.cnf \ | ||
-keyout server.key -out server.csr \ | ||
-extensions v3_req | ||
|
||
echo "Sign cert with ca" | ||
openssl ca -in server.csr -cert ca/ca.pem -keyfile ca/ca.key -config ca/ca.cnf \ | ||
-out server.pem -days 3650 -batch | ||
|
||
rm server.csr | ||
rm ca/ca.cnf | ||
rm req.cnf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#myMPD startup options | ||
MPD_HOST=localhost | ||
MPD_PORT=6600 | ||
#MPD_PASSWORD=--mpdpass PASSWORD | ||
WEB_PORT=80 | ||
#SSL=-S -W 443 -C /etc/mympd/ssl/server.pem -K /etc/mympd/ssl/server.key | ||
MYMPD_USER=nobody | ||
COVERIMAGE=--coverimage folder.jpg | ||
STATEFILE=--statefile /var/lib/mympd/mympd.state |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,10 +36,6 @@ button { | |
min-width: 50px; | ||
} | ||
|
||
#search { | ||
width: 200px; | ||
} | ||
|
||
.card { | ||
min-height:350px; | ||
} | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.