diff --git a/CMakeLists.txt b/CMakeLists.txt index 02ee514..4e1d183 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,7 @@ file(GLOB RESOURCES htdocs/css/*.css htdocs/fonts/* htdocs/index.html + htdocs/player.html ) set(SOURCES diff --git a/README.md b/README.md index bc14cb8..4bf91f2 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ Run flags ``` Usage: ./ympd [OPTION]... + -D, --digest path to htdigest file for authorization + (realm ympd) [no authorization] -h, --host connect to mpd at host [localhost] -p, --port connect to mpd at port [6600] -w, --webport [ip:] listen interface/port for webserver [8080] @@ -52,6 +54,12 @@ To run ympd with SSL support: # ./ympd -w "ssl://8081:/path/to/ssl.pem" ``` +Dirble support +-------------- + +1. Get an API-key from http://dirble.com +2. Add the key at ```var TOKEN = "";```, in ```mpd.js```. + Copyright --------- diff --git a/contrib/init.debian b/contrib/init.debian index 943e4de..6b328f0 100755 --- a/contrib/init.debian +++ b/contrib/init.debian @@ -25,6 +25,8 @@ MPD_HOST=localhost MPD_PORT=6600 WEB_PORT=8080 DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a +#DIGEST=--digest /path/to/htdigest +#LOCALPORT=8080 # Exit if the package is not installed @@ -36,7 +38,7 @@ DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a # Load the VERBOSE setting and other rcS variables [ -f /etc/default/rcS ] && . /etc/default/rcS -DAEMON_OPT="--user $YMPD_USER --mpdpass '$MPD_PASSWORD' --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN" +DAEMON_OPT="--user $YMPD_USER --mpdpass '$MPD_PASSWORD' --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN $DIGEST $LOCALPORT" do_start() { diff --git a/contrib/ympd.default b/contrib/ympd.default index d97ac73..b1bf9fd 100644 --- a/contrib/ympd.default +++ b/contrib/ympd.default @@ -3,3 +3,5 @@ MPD_PORT=6600 MPD_PASSWORD= WEB_PORT=8080 DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a +#DIGEST=--digest /path/to/htdigest +#LOCALPORT=--localport 8080 diff --git a/contrib/ympd.service b/contrib/ympd.service index cb1abdc..5037dad 100644 --- a/contrib/ympd.service +++ b/contrib/ympd.service @@ -29,8 +29,10 @@ Environment=MPD_PASSWORD= Environment=WEB_PORT=8080 Environment=YMPD_USER=nobody Environment=DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a +Environment=DIGEST= +Environment=LOCALPORT= EnvironmentFile=/etc/default/ympd -ExecStart=/usr/bin/ympd --user $USER --mpdpass "$MPD_PASSWORD" --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN +ExecStart=/usr/bin/ympd --user $USER --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN $DIGEST $LOCALPORT Type=simple [Install] diff --git a/htdocs/css/mpd.css b/htdocs/css/mpd.css index 8931c92..a5c6acc 100644 --- a/htdocs/css/mpd.css +++ b/htdocs/css/mpd.css @@ -15,12 +15,29 @@ body { margin-bottom: 0; } + +button { + overflow: hidden; +} + + #volume-icon { float: left; margin-right: 10px; margin-top: 2px; } +#breadcrump { + display: block; + + overflow: auto; + white-space: nowrap; +} + +#breadcrump > li > a{ + cursor: pointer; +} + #counter { font-size: 24px; margin-top: -6px; @@ -55,13 +72,50 @@ body { } } -#salamisandwich td:nth-last-child(2), th:nth-last-child(2) { - text-align: right; +h1 { + display: block; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; } -#salamisandwich td:nth-child(2) span { - font-style:italic; - font-size:90%; +td:nth-child(4), th:nth-child(4) { + /* This *has* to be placed before + any t[dh]:nth-last-child(2) for + the override to work. */ + min-width: 50%; +} + +td:nth-last-child(2), th:nth-last-child(2) { + text-align: right; + width: 4em; +} + +#salamisandwich td:nth-child(4) span { + font-size: 90%; + + display: block; +} + +td:nth-child(2), td:nth-child(3) { + min-width: 25%; + max-width: 10em; + + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +@media only screen and (max-width: 600px) { + td:nth-child(2), td:nth-child(3) { + min-width: 0; + max-width: 0; + } + td:nth-child(4), th:nth-child(4) { + min-width: 10%; + white-space: normal; + } } tbody { @@ -77,7 +131,7 @@ td:last-child, td:first-child { z-index: 9999; } -/* Positioning */ +/* Positioning */ .notifications.top-right { right: 10px; top: 60px; @@ -99,3 +153,11 @@ button { text-align:left; width:2.8em; } + +#filter > a.active { + font-weight: bold; + pointer-events: none; + cursor: default; + text-decoration: none; + color: black; +} diff --git a/htdocs/index.html b/htdocs/index.html index 6bf5c60..ac05928 100644 --- a/htdocs/index.html +++ b/htdocs/index.html @@ -34,7 +34,7 @@