1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-06-25 22:23:16 +00:00

Improved documentation

This commit is contained in:
jcorporation 2018-07-11 01:01:04 +01:00
parent 69d95a8ab1
commit bccda91585
3 changed files with 60 additions and 12 deletions

View File

@ -3,10 +3,27 @@ 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
@ -31,7 +48,7 @@ Unix Build Instructions
1. install dependencies. cmake, libmpdclient (dev) and OpenSSL (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
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
@ -58,8 +75,8 @@ Usage: ./mympd [OPTION]...
SSL
---
1. Create ca and certificate ```/path/to/src/contrib/crcert.sh```
2. Start mympd with -S
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
Copyright

View File

@ -50,7 +50,7 @@ basicConstraints = CA:false
EOL
openssl req -new -x509 -newkey rsa:2048 -sha256 -days 1000 -nodes -config ca.cnf \
openssl req -new -x509 -newkey rsa:2048 -sha256 -days 3650 -nodes -config ca.cnf \
-keyout ca.key -out ca.pem
HOSTNAME=$(hostname)
@ -87,13 +87,13 @@ IP.1 = $IP
IP.2 = 127.0.0.1
EOL
openssl req -new -sha256 -newkey rsa:2048 -days 1000 -nodes -config req.cnf \
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 1000 -batch
-out server.pem -days 3650 -batch
rm server.csr
rm ca/ca.cnf

View File

@ -2,26 +2,31 @@
if [ -f buildtools/closure-compiler.jar ]
then
echo "Minifying javascript"
[ htdocs/js/player.js -nt htdocs/js/player.min.js ] && \
java -jar buildtools/closure-compiler.jar htdocs/js/player.js > htdocs/js/player.min.js
[ htdocs/js/mpd.js -nt htdocs/js/mpd.min.js ] && \
java -jar buildtools/closure-compiler.jar htdocs/js/mpd.js > htdocs/js/mpd.min.js
else
echo "buildtools/closure-compiler.jar not found, using non-minified files"
[ htdocs/js/player.js -nt htdocs/js/player.min.js ] && \
cp htdocs/js/player.js htdocs/js/player.min.js
[ htdocs/js/mpd.js -nt htdocs/js/mpd.min.js ] && \
cp htdocs/js/mpd.js htdocs/js/mpd.min.js
fi
if [ -f buildtools/closure-stylesheets.jar ]
then
then
echo "Minifying stylesheets"
[ htdocs/css/mpd.css -nt htdocs/css/mpd.min.css ] && \
java -jar buildtools/closure-stylesheets.jar htdocs/css/mpd.css > htdocs/css/mpd.min.css
else
echo "buildtools/closure-stylesheets.jar not found, using non-minified files"
[ htdocs/css/mpd.css -nt htdocs/css/mpd.min.css ] && \
cp htdocs/css/mpd.css htdocs/css/mpd.min.css
fi
echo "Compiling and installing mympd"
[ -d release ] || mkdir release
cd release
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=RELEASE ..
@ -29,17 +34,43 @@ make
sudo make install
cd ..
echo "Replacing javascript and stylesheets with minified files"
sudo sed -i -e 's/mpd\.css/mpd\.min\.css/' -e 's/mpd\.js/mpd\.min\.js/' /usr/share/mympd/htdocs/index.html
sudo sed -i -e 's/mpd\.css/mpd\.min\.css/' -e 's/player\.js/player\.min\.js/' /usr/share/mympd/htdocs/player.html
echo "Fixing ownership of /var/lib/mympd"
sudo chown nobody /var/lib/mympd
[ -d /etc/systemd/system ] && \
sudo cp -v contrib/mympd.service /etc/systemd/system/
echo "Trying to link musicdir to library"
if [ -f /etc/mpd.conf ]
then
LIBRARY=$(grep music /etc/mpd.conf | awk {'print $2'})
[ "$LIBRARY" != "" ] && ln -s $LIBRARY /usr/share/mympd/htdocs/library
else
echo "/etc/mpd.conf not found, you must link your musicdir manually to /usr/share/mympd/htdocs/library"
fi
echo "Installing systemd service"
if [ -d /etc/systemd/system ]
then
if [ contrib/mympd.service -nt /etc/systemd/system/mympd.service ]
then
sudo cp -v contrib/mympd.service /etc/systemd/system/
systemctl daemon-reload
fi
systemctl enable mympd
fi
[ -d /etc/default ] && \
sudo cp -v contrib/mympd.default /etc/default/mympd
[ -d /etc/mympd/ssl ] || contrib/crcert.sh
if [ -d /etc/mympd/ssl ]
then
echo "Certificates already created"
else
echo "Creating certificates"
contrib/crcert.sh
fi
echo "myMPD installed"
echo "Edit /etc/systemd/system/mympd.service and/or /etc/default/mympd before starting mympd"