Skip to content

Commit

Permalink
5.2 production
Browse files Browse the repository at this point in the history
  • Loading branch information
moodeaudio committed May 11, 2019
1 parent 3aeabc9 commit 3db3923
Show file tree
Hide file tree
Showing 76 changed files with 323 additions and 256 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[playlist]
numberofentries=1
File1=http://kuvo-ice.streamguys.org/kuvohd2-aac-128
Title1=KUVO HD2 - Jazz with Bob Parlocha
Title1=KUVO HD2
Length1=-1
version=2
64 changes: 35 additions & 29 deletions other/build/build_recipe_v2.8.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
################################################################
#
# Build Recipe v2.8, 2019-04-12
# Build Recipe v2.8, 2019-05-07
#
# moOde 5.0 2019-04-12
# moOde 5.2 2019-05-07
#
# These instructions are written for Linux Enthusiasts
# and System Integrators and provide a recipe for making
Expand Down Expand Up @@ -148,8 +148,8 @@ sudo timedatectl set-timezone "America/Detroit"
//

cd ~
wget http://moodeaudio.org/downloads/prod/rel-stretch-r50.zip
sudo unzip ./rel-stretch-r50.zip
wget http://moodeaudio.org/downloads/prod/rel-stretch-r52.zip
sudo unzip ./rel-stretch-r52.zip

5. Expand the root partition to 3GB.

Expand Down Expand Up @@ -198,13 +198,12 @@ samba smbclient udisks-glue ntfs-3g exfat-fuse git inotify-tools libav-tools ava
python3-setuptools libmediainfo0v5 libmms0 libtinyxml2-4 libzen0v5 libmediainfo-dev libzen-dev

# meson
sudo cp ./rel-stretch/other/mpd/build-tools/meson-0.48.1.tar.gz ./
sudo tar xfz meson-0.48.1.tar.gz
cd meson-0.48.1
sudo cp ./rel-stretch/other/mpd/build-tools/meson-0.50.1.tar.gz ./
sudo tar xfz meson-0.50.1.tar.gz
cd meson-0.50.1
sudo python3 setup.py install
cd ~
sudo rm -rf meson-0.48.1
sudo rm -f meson-0.48.1.tar.gz
sudo rm -rf meson-0.50.1*

# mediainfo
sudo cp ./rel-stretch/other/mediainfo/mediainfo-18.12 /usr/local/bin/mediainfo
Expand Down Expand Up @@ -240,7 +239,7 @@ sudo autoreconf --install
sudo ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --enable-library
sudo make
sudo make install
cd ~
cd ..
sudo rm -rf ./bluez-5.50*

# Delete symlink and bin for old bluetoothd
Expand All @@ -261,7 +260,7 @@ cd build
sudo ../configure --disable-hcitop --with-alsaplugindir=/usr/lib/arm-linux-gnueabihf/alsa-lib
sudo make
sudo make install
cd ~
cd ../..
sudo rm -rf bluez-alsa-master*

3. Services are started by moOde Worker so lets disable them here.
Expand Down Expand Up @@ -345,15 +344,15 @@ libboost-dev \
libicu-dev \
libglib2.0-dev

3. Download MPD 0.20.20 sources and prep for compile.
3. Download MPD 0.20.23 sources and prep for compile.

# Optionally install pre-compiled binary and skip to STEP 7
sudo cp ./rel-stretch/other/mpd/mpd-0.20.20 /usr/local/bin/mpd
sudo cp ./rel-stretch/other/mpd/mpd-0.20.23 /usr/local/bin/mpd
sudo reboot

sudo wget http://www.musicpd.org/download/mpd/0.20/mpd-0.20.20.tar.xz
sudo tar xf mpd-0.20.20.tar.xz
cd mpd-0.20.20
sudo wget http://www.musicpd.org/download/mpd/0.20/mpd-0.20.23.tar.xz
sudo tar xf mpd-0.20.23.tar.xz
cd mpd-0.20.23
sudo sh autogen.sh

4. Configure compile options.
Expand All @@ -376,7 +375,7 @@ sudo make
sudo make install
sudo strip --strip-unneeded /usr/local/bin/mpd
cd ~
sudo rm -rf ./mpd-0.20.20*
sudo rm -rf ./mpd-0.20.23*

sudo apt-get clean
sudo apt-get -y autoremove
Expand Down Expand Up @@ -426,15 +425,15 @@ libboost-dev \
libicu-dev \
libglib2.0-dev

3. Download MPD 0.21.6 sources and prep for compile.
3. Download MPD 0.21.8 sources and prep for compile.

# Optionally install pre-compiled binary and skip to STEP 7
sudo cp ./rel-stretch/other/mpd/mpd-0.21.6 /usr/local/bin/mpd
sudo cp ./rel-stretch/other/mpd/mpd-0.21.8 /usr/local/bin/mpd
sudo reboot

sudo wget http://www.musicpd.org/download/mpd/0.21/mpd-0.21.6.tar.xz
sudo tar xf mpd-0.21.6.tar.xz
cd mpd-0.21.6
sudo wget http://www.musicpd.org/download/mpd/0.21/mpd-0.21.8.tar.xz
sudo tar xf mpd-0.21.8.tar.xz
cd mpd-0.21.8
sudo meson . output/release --buildtype=release -Db_ndebug=true

4. Configure compile options.
Expand Down Expand Up @@ -490,7 +489,7 @@ output/release
sudo ninja -C output/release
sudo ninja -C output/release install
cd ~
sudo rm -rf ./mpd-0.21.6*
sudo rm -rf ./mpd-0.21.8*

sudo apt-get clean
sudo apt-get -y autoremove
Expand Down Expand Up @@ -582,6 +581,7 @@ sudo chmod 0755 /home/pi/*.sh
sudo chmod 0755 /home/pi/*.php
sudo chmod 0755 /var/www/command/*

sudo sqlite3 /var/local/www/db/moode-sqlite3.db "CREATE TRIGGER ro_columns BEFORE UPDATE OF param, value, [action] ON cfg_hash FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'read only'); END;"
sudo sqlite3 /var/local/www/db/moode-sqlite3.db "update cfg_system set value='Emerald' where param='accent_color'"

3. Permissions for service files
Expand Down Expand Up @@ -619,10 +619,11 @@ sudo systemctl disable squeezelite
sudo chmod 0644 /lib/systemd/system/upmpdcli.service
sudo systemctl disable upmpdcli.service

5. Reset dir permissions for var local
5. Reset permissions for var and usr local
sudo chmod -R 0755 /var/local/www
sudo chmod -R 0777 /var/local/www/db
sudo chmod -R ug-s /var/local/www
sudo chmod -R 0755 /usr/local/bin

6. Initial permissions for certain files. These also get set during moOde Worker startup.

Expand Down Expand Up @@ -678,12 +679,16 @@ sudo reboot
//
////////////////////////////////////////////////////////////////


# kernel ver 4.19.40
echo "y" | sudo PRUNE_MODULES=1 rpi-update 6cb1da772a8c56f44591bec904046b15f1126949
# kernel ver 4.19.34
echo "y" | sudo PRUNE_MODULES=1 rpi-update 99c274691c07480762dcda91a0ebfe3c4f519307
# Fix for missing 4.19.y regulatory.db files
sudo cp ./rel-stretch/other/firmware/regulatory.db* /lib/firmware

# kernel ver 4.14.98
echo "y" | sudo PRUNE_MODULES=1 rpi-update a08ece3d48c3c40bf1b501772af9933249c11c5b

# cleanup
sudo rm -rf /lib/modules.bak
sudo rm -rf /boot.bak
Expand Down Expand Up @@ -818,9 +823,10 @@ sudo chmod 0755 /usr/local/etc/mpdasrc
sudo apt-get -y install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev \
avahi-daemon libavahi-client-dev libssl-dev libsoxr-dev

sudo cp ./rel-stretch/other/shairport-sync/shairport-sync-3.3.0-rc2-ff9c613.zip ./
sudo unzip ./shairport-sync-3.3.0-rc2-ff9c613.zip
cd ./shairport-sync-3.3RC2
sudo cp ./rel-stretch/other/shairport-sync/shairport-sync-3.3.0-rc6-0c65236.zip ./
sudo unzip ./shairport-sync-3.3.0-rc6-0c65236.zip
cd ./shairport-sync-0c6523636cd8cef950a33381621f2cbe9b7dd4de


sudo autoreconf -i -f
sudo ./configure --with-alsa --with-avahi --with-ssl=openssl --with-soxr --with-metadata --with-stdout --with-systemd --with-dbus-interface --sysconfdir=/etc
Expand Down Expand Up @@ -1003,7 +1009,7 @@ d. Optionally, enter url chrome://extensions and install the xontab virtual keyb

cd ~
wget https://github.com/allocom/piano-firmware/archive/master.zip
sudo unzip master.zip
sudo unzip -q master.zip
sudo rm ./master.zip
sudo cp -r ./piano-firmware-master/lib/firmware/allo /lib/firmware
sudo rm -rf ./piano-firmware-master
Expand Down
File renamed without changes.
Binary file removed other/mpd/build-tools/meson-0.48.1.tar.gz
Binary file not shown.
Binary file added other/mpd/build-tools/meson-0.50.1.tar.gz
Binary file not shown.
Binary file removed other/mpd/mpd-0.20.20
Binary file not shown.
Binary file removed other/mpd/mpd-0.20.20.tar.xz
Binary file not shown.
Binary file added other/mpd/mpd-0.20.23
Binary file not shown.
Binary file added other/mpd/mpd-0.20.23.tar.xz
Binary file not shown.
Binary file removed other/mpd/mpd-0.21.6
Binary file not shown.
Binary file removed other/mpd/mpd-0.21.6.tar.xz
Binary file not shown.
Binary file added other/mpd/mpd-0.21.8
Binary file not shown.
Binary file added other/mpd/mpd-0.21.8.tar.xz
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions usr/local/bin/moodeutl.php → usr/local/bin/moodeutl
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

define('VERSION', '1.0');
define('VERSION', '1.1');

$option = isset($argv[1]) ? $argv[1] : '';

Expand Down
Binary file modified var/local/www/db/moode-sqlite3.db.default
Binary file not shown.
3 changes: 2 additions & 1 deletion var/local/www/db/moode-sqlite3.db.schema
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ CREATE TABLE cfg_hash (id INTEGER PRIMARY KEY, param CHAR (64), value CHAR (64),
CREATE TABLE cfg_mpd (id INTEGER PRIMARY KEY, param CHAR (32), value CHAR (32));
CREATE TABLE cfg_radio (id INTEGER PRIMARY KEY, station CHAR (128), name CHAR (128), type CHAR (8), logo CHAR (128));
CREATE TABLE cfg_gpio (id INTEGER PRIMARY KEY, pin CHAR (2), enabled CHAR (1), command CHAR (64), param CHAR (32), value CHAR (32));
CREATE UNIQUE INDEX IndexName ON cfg_source (name);
CREATE TABLE cfg_audiodev (id INTEGER PRIMARY KEY, name CHAR (64), dacchip CHAR (64), chipoptions CHAR (64), iface CHAR (32), list CHAR (10), driver CHAR (64), drvoptions CHAR (64));
CREATE UNIQUE INDEX IndexName ON cfg_source (name);
CREATE TRIGGER ro_columns BEFORE UPDATE OF param, value, [action] ON cfg_hash FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'read only'); END;
2 changes: 1 addition & 1 deletion var/local/www/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/
-->
Expand Down
2 changes: 1 addition & 1 deletion www/apl-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down
2 changes: 1 addition & 1 deletion www/blu-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down
2 changes: 1 addition & 1 deletion www/chp-config.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* Refer to the link below for a copy of the GNU General Public License.
* http://www.gnu.org/licenses/
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down
10 changes: 5 additions & 5 deletions www/command/moode.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down Expand Up @@ -403,19 +403,19 @@

if ($_GET['cmd'] == 'newstation') {
// cant have same name as existing station
$result = sdbquery("SELECT id FROM cfg_radio WHERE name='" . $station_name . "'", $dbh);
$result = sdbquery("SELECT id FROM cfg_radio WHERE name='" . SQLite3::escapeString($station_name) . "'", $dbh);

// true = query successful but no results, array = results, false = query bombed (not likely)
if ($result === true) {
// add new row to sql table
$values = "'" . $_POST['url'] . "'," . "'" . $station_name . "','u','local'";
$values = "'" . $_POST['url'] . "'," . "'" . SQLite3::escapeString($station_name) . "','u','local'";
$result = sdbquery('INSERT INTO cfg_radio VALUES (NULL,' . $values . ')', $dbh); // NULL causes the Id column to be set to the next number
}
}
else {
// if name changed then its same as an add and we have to check the name doesnt already exist
// if only the url changed then we update
$result = cfgdb_update('cfg_radio', $dbh, $station_name, $_POST['url']);
$result = cfgdb_update('cfg_radio', $dbh, SQLite3::escapeString($station_name), $_POST['url']);
}

// add session var
Expand Down Expand Up @@ -454,7 +454,7 @@
workerLog($_GET['cmd'] . ', ' . $station_name);

// remove row and delete file
$result = sdbquery("DELETE FROM cfg_radio WHERE name='" . $station_name . "'", $dbh);
$result = sdbquery("DELETE FROM cfg_radio WHERE name='" . SQLite3::escapeString($station_name) . "'", $dbh);
sysCmd('rm "' . MPD_MUSICROOT . $_POST['path'] . '"');
sysCmd('rm "' . '/var/www/images/radio-logos/' . $station_name . '.jpg' . '"');
sysCmd('rm "' . '/var/www/images/radio-logos/thumbs/' . $station_name . '.jpg' . '"');
Expand Down
9 changes: 1 addition & 8 deletions www/command/worker.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* 2019-04-12 TC moOde 5.0
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down Expand Up @@ -134,13 +134,6 @@
$_SESSION['raspbianver'] = $result[0];
$_SESSION['moode_release'] = getMoodeRel();

// exit if running an unsupported hdwrrev
if (substr($_SESSION['hdwrrev'], 0, 6) == 'Pi-CM3') {
workerLog('worker: Unsupported hardware platform (' . $_SESSION['hdwrrev'] . ')');
workerLog('worker: Exited');
exit;
}

// log platform data
workerLog('worker: Rel (Moode ' . getMoodeRel('verbose') . ')'); // X.Y yyyy-mm-dd ex: 2.6 2016-06-07
workerLog('worker: Upd (' . $_SESSION['pkgdate'] . ')');
Expand Down
2 changes: 1 addition & 1 deletion www/css/fontawesome-moode.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Font Awesome Pro 5.0.10 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license (Commercial License)
*
* 2019-04-12 TC moOde 5.0
* 2019-04-12 TC moOde 5.1
*
*/
.fa,
Expand Down
16 changes: 9 additions & 7 deletions www/css/moode.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* Refer to the link below for a copy of the GNU General Public License.
* http://www.gnu.org/licenses/
*
* 2019-04-12 TC moOde 4.5
* 2019-05-07 TC moOde 5.2
*
*/

Expand Down Expand Up @@ -190,7 +190,7 @@ li.modal-dropdown-text:focus {color:#eee;}
#timeline {display:block;}
#mobile-time {display:block;}
.btn btn-cmd btn-toggle {font-size:.75em;}
img.coverart {width:50vh;height:auto;max-width:83vw;border:none;}
img.coverart {width:50vh;height:auto;max-width:90vw;max-height:90vw;border:none;}
img.libart {width:90%;}
.modal-sm2 {min-width:80%;}
.form-horizontal .controls {margin-left:0;}
Expand All @@ -208,7 +208,7 @@ li.modal-dropdown-text:focus {color:#eee;}
#menu-settings {font-size:1.65rem;padding:0 .5em;}
#menu-settings i {font-size:1rem;}
.playlist span {margin-left:calc(3.5rem + 1vmin);}
.playlist {padding:0 0 8rem 0;}
.playlist {padding:0 0 8rem 0;min-height:33vh;}
.playlist li, .playlist .active {padding-left:.5em;}
.playlist li:before {font-size:unset;}
#lib-albumcover {left:0;}
Expand Down Expand Up @@ -376,13 +376,16 @@ li.modal-dropdown-text:focus {color:#eee;}
#index-radio ul li:nth-child(4n+0), #index-browse ul li:nth-child(4n+0), #index-albumcovers ul li:nth-child(4n+0) {display:block !important;}
}

/* app stuff for Max */
/* iPhone X */
@media (width: 375px) and (height:812px) {
.playlist {padding:0 0 8rem 0;min-height:35vh;}
}

/* iPhone X Max */
@media (width: 414px) and (height:818px) {
#menu-top {padding-top:calc(env(safe-area-inset-top) - .5em);}
.viewswitch {top:calc(env(safe-area-inset-top) - .5em);}
.btnlist.btnlist-top.btnlist-top-pl, .btnlist.btnlist-top.btnlist-top-lib {top:calc(env(safe-area-inset-top) - .25em);}
img.coverart {max-width:90vw;max-height:90vw;}
.playlist {padding:0 0 11rem 0;}
#songsList {padding-bottom:calc(5.5em + env(safe-area-inset-bottom));}
.ui-pnotify {top: calc(env(safe-area-inset-top));right: calc(env(safe-area-inset-right) + 1em);}
#playbar-cover {margin-left:.5em;border-radius:.1em .1em .1em 50%;}
Expand All @@ -400,7 +403,6 @@ li.modal-dropdown-text:focus {color:#eee;}
.database-radiolist .db-entry, .database-radiolist .cover-menu {font-size:1.2em;}
}


@media (width: 896px) and (height:414px) {
.span5 {margin-left:calc(env(safe-area-inset-left) - 2rem);}
.span4 {margin-right:calc(env(safe-area-inset-right) - 2rem);}
Expand Down
Loading

0 comments on commit 3db3923

Please sign in to comment.