Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge develop into Fix-audiohat-gpio #1125

Merged
merged 20 commits into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions components/gpio_control/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ Up to now the following input devices are implemented:

* **TwoButtonControl**:
This Device uses two Buttons and implements a third action if both buttons are pressed together.

Many example files are located in `~/RPi-Jukebox-RFID/components/gpio_control/example_configs/`.
2 changes: 1 addition & 1 deletion components/gpio_control/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [[ $(id -u) != 0 ]]; then
fi

if [[ ! -f /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini ]]; then
mkdir -p ~/.config/phoniebox && cp /example_configs/gpio_settings.ini /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini
cp /home/pi/RPi-Jukebox-RFID/misc/sampleconfigs/gpio_settings.ini.sample /home/pi/RPi-Jukebox-RFID/settings/gpio_settings.ini
fi

echo 'disable old services: phoniebox-gpio-buttons and phoniebox-rotary-encoder'
Expand Down
2 changes: 1 addition & 1 deletion htdocs/inc.loadedPlaylist.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function createSongInformation(song) {

const title = `<strong>${playerInfo.title}<span id="chapter-current-name"></span></strong>`;

var artist = (playerInfo.artist) ? '<br><i>' + playerInfo.artist.replace(';', ' and ') + '</i>' : '';
var artist = (playerInfo.artist) ? '<br><i>' + playerInfo.artist.replace(/;/gi, ' & ') + '</i>' : '';
if (!artist && playerInfo.name) {
artist = '<br><i>' + playerInfo.name + '</i>';
}
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion scripts/inc.settingsFolderSpecific.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ then
if [ $SHUFFLE == "ON" ]
then
if [ "${DEBUG_inc_settingsFolderSpecific_sh}" == "TRUE" ]; then echo " # # CHANGING: mpc shuffle" >> $PATHDATA/../logs/debug.log; fi
mpc shuffle
# mpc shuffle
else
if [ "${DEBUG_inc_settingsFolderSpecific_sh}" == "TRUE" ]; then echo " # # CHANGING: mpc random off" >> $PATHDATA/../logs/debug.log; fi
mpc random off
Expand Down
16 changes: 14 additions & 2 deletions scripts/inc.writeGlobalConfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Set the date and time of now
NOW=`date +%Y-%m-%d.%H:%M:%S`

# The absolute path to the folder whjch contains all the scripts.
# The absolute path to the folder which contains all the scripts.
# Unless you are working with symlinks, leave the following line untouched.
PATHDATA="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Expand All @@ -33,7 +33,7 @@ PATHDATA="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Read debug logging configuration file
. $PATHDATA/../settings/debugLogging.conf

# The absolute path to the folder whjch contains all the scripts.
# The absolute path to the folder which contains all the scripts.
# Unless you are working with symlinks, leave the following line untouched.
PATHDATA="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
if [ "${DEBUG_inc_writeGlobalConfig_sh}" == "TRUE" ]; then echo "########### SCRIPT inc.writeGlobalConf.sh ($NOW) ##" >> $PATHDATA/../logs/debug.log; fi
Expand Down Expand Up @@ -177,6 +177,16 @@ fi
# 2. then|or read value from file
IDLETIMESHUTDOWN=`cat $PATHDATA/../settings/Idle_Time_Before_Shutdown`

##############################################
# Poweroff_Command
# 1. create a default if file does not exist
if [ ! -f $PATHDATA/../settings/Poweroff_Command ]; then
echo "sudo poweroff" > $PATHDATA/../settings/Poweroff_Command
chmod 777 $PATHDATA/../settings/Poweroff_Command
fi
# 2. then|or read value from file
POWEROFFCMD=`cat $PATHDATA/../settings/Poweroff_Command`

##############################################
# ShowCover
# 1. create a default if file does not exist
Expand Down Expand Up @@ -274,6 +284,7 @@ CMDSEEKBACK=`grep 'CMDSEEKBACK' $PATHDATA/../settings/rfid_trigger_play.conf|tai
# AUDIOVOLSTARTUP
# VOLCHANGEIDLE
# IDLETIMESHUTDOWN
# POWEROFFCMD
# SHOWCOVER
# MAILWLANIPYN
# MAILWLANIPADDR
Expand Down Expand Up @@ -305,6 +316,7 @@ echo "AUDIOVOLMINLIMIT=\"${AUDIOVOLMINLIMIT}\"" >> "${PATHDATA}/../settings/glob
echo "AUDIOVOLSTARTUP=\"${AUDIOVOLSTARTUP}\"" >> "${PATHDATA}/../settings/global.conf"
echo "VOLCHANGEIDLE=\"${VOLCHANGEIDLE}\"" >> "${PATHDATA}/../settings/global.conf"
echo "IDLETIMESHUTDOWN=\"${IDLETIMESHUTDOWN}\"" >> "${PATHDATA}/../settings/global.conf"
echo "POWEROFFCMD=\"${POWEROFFCMD}\"" >> "${PATHDATA}/../settings/global.conf"
echo "SHOWCOVER=\"${SHOWCOVER}\"" >> "${PATHDATA}/../settings/global.conf"
echo "READWLANIPYN=\"${READWLANIPYN}\"" >> "${PATHDATA}/../settings/global.conf"
echo "EDITION=\"${EDITION}\"" >> "${PATHDATA}/../settings/global.conf"
Expand Down
Loading