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 cb3ca72..f0cd0f5 100644 --- a/contrib/ympd.default +++ b/contrib/ympd.default @@ -4,3 +4,5 @@ MPD_PASSWORD= WEB_PORT=8080 YMPD_USER=nobody DIRBLE_API_TOKEN=2e223c9909593b94fc6577361a +#DIGEST=--digest /path/to/htdigest +#LOCALPORT=--localport 8080 diff --git a/contrib/ympd.service b/contrib/ympd.service index 49559c7..43a9e1a 100644 --- a/contrib/ympd.service +++ b/contrib/ympd.service @@ -9,8 +9,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 $YMPD_USER --mpdpass "$MPD_PASSWORD" --webport $WEB_PORT --host $MPD_HOST --port $MPD_PORT --dirbletoken $DIRBLE_API_TOKEN +ExecStart=/usr/bin/ympd --user $YMPD_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 9615cc2..99c765c 100644 --- a/htdocs/css/mpd.css +++ b/htdocs/css/mpd.css @@ -15,12 +15,25 @@ 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; } @@ -59,13 +72,51 @@ 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-style: italic; + 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 { @@ -81,7 +132,7 @@ td:last-child, td:first-child { z-index: 9999; } -/* Positioning */ +/* Positioning */ .notifications.top-right { right: 10px; top: 60px; 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 @@