From b70525fef7122d81bcad386496e3b6253ac0d7b1 Mon Sep 17 00:00:00 2001 From: woutervanwijk Date: Fri, 28 Mar 2014 00:14:49 +0100 Subject: [PATCH] New settings page and websockets location --- webclient/index.html | 41 +++++---- webclient/js/gui.js | 7 +- webclient/mb.manifest | 0 webclient/mopidy | 1 + webclient/settings/index.html | 166 +++++++++++++++++++++++++++++----- webclient/system.html | 2 +- 6 files changed, 176 insertions(+), 41 deletions(-) mode change 100755 => 100644 webclient/index.html mode change 100755 => 100644 webclient/mb.manifest create mode 120000 webclient/mopidy mode change 100755 => 100644 webclient/settings/index.html mode change 100755 => 100644 webclient/system.html diff --git a/webclient/index.html b/webclient/index.html old mode 100755 new mode 100644 index b9bff55..4bd19a7 --- a/webclient/index.html +++ b/webclient/index.html @@ -2,10 +2,28 @@ - + @@ -24,20 +42,6 @@ - @@ -87,9 +91,12 @@ Exit Fullscreen - +
  • diff --git a/webclient/js/gui.js b/webclient/js/gui.js index 68d3fc6..25a12d8 100644 --- a/webclient/js/gui.js +++ b/webclient/js/gui.js @@ -416,7 +416,12 @@ $(document).ready(function(event) { $(window).hashchange(); // Connect to server - mopidy = new Mopidy(); +// mopidy = new Mopidy(); +// console.log(wsLocation); +// $.getScript( wsLocation + '/mopidy/mopidy.min.js'); + mopidy = new Mopidy({ + webSocketUrl: 'ws://' + wsLocation + '/mopidy/ws/' // wslocation is set in index.html "ws://localhost:6680/mopidy/ws/" + }); // mopidy.on(console.log.bind(console)); // Log all events // mopidy.on(console.error.bind(console)); //initialize events diff --git a/webclient/mb.manifest b/webclient/mb.manifest old mode 100755 new mode 100644 diff --git a/webclient/mopidy b/webclient/mopidy new file mode 120000 index 0000000..3ab2164 --- /dev/null +++ b/webclient/mopidy @@ -0,0 +1 @@ +/usr/share/mopidy/mopidy/http/data \ No newline at end of file diff --git a/webclient/settings/index.html b/webclient/settings/index.html old mode 100755 new mode 100644 index 21e1d53..46d9e36 --- a/webclient/settings/index.html +++ b/webclient/settings/index.html @@ -1,28 +1,150 @@ - - - Mopidy Settings - - - -
    -

    Settings

    -

    Spotify

    -

    Please provide your username, password to enable playing music from Spotify.

    -
    -

    Username

    - -

    Password

    - -

    Last.FM

    + + + + + + + + + + + + + -

    Please provide the username, password to enable scrobbling via Last.FM.

    -

    Username

    - -

    Password

    - -

    + + + + + + + + + + + + + + + + + +
    +

    Settings

    +
    {{ error }}
    + +
    +

    MusicBox

    + +

    Set the name of the MusicBox. In this way you can create different devices on the same network (in different rooms). The webinterface is accessible via the name you use here, e.g. http://kitchen.local/, and multiple devices will show up in AirTunes. You can only use normal caracters and numbers in the name (no spaces, dots, etc). You can even have different devices with different Spotify accounts when needed.

    + + + +

    To secure your device a bit more than with only changing the default password, you can also change the default password of root, the superuser.

    + + +
    +

    Enable this to let MusicBox automatically resize the filesystem of your SD Card, so the system uses all the space of your card. Recommended because otherwise the card might fill up. This is beta, you can lose data on your card if you enable this!! (If so, you can put the original MusicBox image on it again and start over)

    +
    + +
    + +
    +

    Use this setting to let Mopidy/MusicBox scan on startup for new music files on the SD Card, USB or the Network. This could take a while! This can slowdown the boot a lot. Disable it again if your music doesn't change.

    +
    + +
    + +
    + +
    +

    Network

    + + + + + + +

    Here you can change the default workgroup of the Windows network. This will set the workgroup to the name you want

    + + + +

    Mount Windows Network Drive on boot (via samba/cifs). The address is exactly how Samba mount works: //servername/mountpoint/directory e.g. //192.168.1.5/musicmount or //server.local/shared/music
    +If the mount needs a username/password, also set it (leave empty for guest-access). Don't forget to let Mopidy/MusicBox scan the contents at first boot (see below)

    + + + + + + + + +
    +
    + +
    +
    +
    +

    Spotify

    +

    Please provide your username, password to enable playing music from Spotify.

    +
    +
    + +
    + + + + + + +
    + +
    +

    Last.FM

    +

    Please provide your username, password to enable scrobbling music to Last.FM.

    +
    +
    + +
    + + + + +
    + +
    +

    Dirble

    +

    Enable Dirble webradio directory.

    +
    +
    + +
    + +

    Optionally you can get an api-key by creating an account at Dirble.com. Then go to the section 'Your API-Keys' and copy the key you see and fill it in e.g 473279e3fa0e7010cbbbb40ecc31890d46e57a2e

    + + +
    +
    diff --git a/webclient/system.html b/webclient/system.html old mode 100755 new mode 100644 index d7715b8..a8f1d6e --- a/webclient/system.html +++ b/webclient/system.html @@ -13,7 +13,7 @@ -
    +

    System