diff --git a/README.md b/README.md index bac34f3d2..0db5d8208 100755 --- a/README.md +++ b/README.md @@ -5,9 +5,10 @@ A contactless jukebox for the Raspberry Pi, playing audio files, playlists, podc *Important update news* * **Phoniebox 1.0 released** The latest release is saving battery power on the road, replaces the audio player with `mpd` and adds *resume play* as a feature - which is not meant for toddlers but audiobook lovers (aka Phoniebox is growing up!). (2018-08-18) +* **Upgrade** if you are looking for *how to upgrade* please check out [UPGRADE.md](docs/UPGRADE.md) - and if you found out something that should go there, please create a pull request. (2018-08-30) * **One Line Install Script** As of version 1.0 there is a much simpler install procedure: copy and paste one line into your terminal and hit *enter*. Find out more about the [one-line Phoniebox install script](docs/INSTALL-stretch.md#oneLineInstall). (2018-08-18) * **Podcasts!** More for myself than anybody else, I guess, I added the [podcast feature for Phoniebox](docs/MANUAL.md#podcasts) (2018-05-09) - +* **Bleeding edge: `develop` branch** The maintenance with a growing contributor team (kudos!) got complicated. I introduced the branch `develop` which is where all new stuff is happening before merged to `master`. (2018-08-30) --- Prototype of the RFID jukebox diff --git a/docs/UPGRADE.md b/docs/UPGRADE.md index 56ca28300..d7ad7c4d0 100755 --- a/docs/UPGRADE.md +++ b/docs/UPGRADE.md @@ -9,9 +9,11 @@ Some elements of the installation depend on the OS (like 'Jessie' vs. 'Stretch') ## Which version am I on? -As of version 0.9.4 there is a file `settings/version` containing the version number. -For future reference, I will try to break down the upgrade patches / scripts from number -to number. +There is a file `settings/version` containing the version number. + +# Upgrade to Version 1.0 + +As of version 1.0 there is a much simpler install procedure: copy and paste one line into your terminal and hit *enter*. Find out more about the [one-line Phoniebox install script](INSTALL-stretch.md#oneLineInstall). # Upgrade from 0.9.5 to 0.9.7 * Adding a *Settings* page in the web app to control features like 'idle shutdown' and 'max volume' and toggle systemd services diff --git a/htdocs/inc.header.php b/htdocs/inc.header.php index 1c2006a1d..ace9deae2 100755 --- a/htdocs/inc.header.php +++ b/htdocs/inc.header.php @@ -70,6 +70,8 @@ // path to script folder from github repo on RPi $conf['scripts_abs'] = realpath(getcwd().'/../scripts/'); +// path to shared folder from github repo on RPi +$conf['shared_abs'] = realpath(getcwd().'/../shared/'); /* * Vars from the settings folder diff --git a/htdocs/trackEdit.php b/htdocs/trackEdit.php index b210076d2..5ea485fed 100755 --- a/htdocs/trackEdit.php +++ b/htdocs/trackEdit.php @@ -10,56 +10,6 @@ ***************************************************/ /* NO CHANGES BENEATH THIS LINE ***********/ -/* -* Configuration file -* Due to an initial commit with the config file 'config.php' and NOT 'config.php.sample' -* we need to check first if the config file exists (it might get erased by 'git pull'). -* If it does not exist: -* a) copy sample file to config.php and give warning -* b) if sample file does not exist: throw error and die -*/ -if(!file_exists("config.php")) { - if(!file_exists("config.php.sample")) { - // no config nor sample config found. die. - print "

Configuration file not found

-

The files 'config.php' and 'config.php.sample' were not found in the - directory 'htdocs'. Please download 'htdocs/config.php.sample' from the - online repository, - copy it locally to 'htdocs/config.php' and then adjust it to fit your system.

"; - die; - } else { - // no config but sample config found: make copy (and give warning) - if(!(copy("config.php.sample", "config.php"))) { - // sample config can not be copied. die. - print "

Configuration file could not be created

-

The file 'config.php' was not found in the - directory 'htdocs'. Attempting to create this file from 'config.php.sample' - resulted in an error.

-

- Are the folder settings correct? You could try to run the following commands - inside the folder 'RPi-Jukebox-RFID' and then reload the page:
-

-sudo chmod -R 775 htdocs/
-sudo chgrp -R www-data htdocs/
-                
-

- Alternatively, download 'htdocs/config.php.sample' from the - online repository, - copy it locally to 'htdocs/config.php' and then adjust it to fit your system.

"; - die; - } else { - $warning = "

Configuration file created

-

The file 'config.php' was not found in the - directory 'htdocs'. A copy of the sample file 'config.php.sample' was made automatically. - If you encounter any errors, edit the newly created 'config.php'. -

- "; - } - } -} -include("config.php"); - -$conf['url_abs'] = "http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; // URL to PHP_SELF $trackDat = array(); $trackDat['metaKeys']['mp3'] = array( @@ -174,11 +124,6 @@ */ -include("func.php"); - -// path to script folder from github repo on RPi -$conf['shared_abs'] = realpath(getcwd().'/../shared/'); - /******************************************* * URLPARAMETERS *******************************************/ diff --git a/scripts/installscripts/stretch-install-default.sh b/scripts/installscripts/stretch-install-default.sh index e7471c602..9f63d57b2 100755 --- a/scripts/installscripts/stretch-install-default.sh +++ b/scripts/installscripts/stretch-install-default.sh @@ -285,7 +285,7 @@ echo "##################################################### # # CONFIGURE MPD # -# MPD (Music Player Daemon) runs the audio output and must +# MPD (Music Player Daemon) runs the audio output and must # be configured. Do it now, if you are unsure. # (Note: can be done manually later.) " @@ -322,12 +322,17 @@ echo "##################################################### # # If unsure, keep it like this. If your files are somewhere # else, you can specify the folder in the next step. +# IMPORTANT: the folder will not be created, only the path +# will be remembered. If you use a custom folder, you must +# create it. " read -r -p "Do you want to use the default location? [Y/n] " response case "$response" in [nN][oO]|[nN]) echo "Please type the absolute path here (no trailing slash)." + echo "Default would be for example:" + echo "/home/pi/RPi-Jukebox-RFID/shared/audiofolders" read INPUT DIRaudioFolders="$INPUT" ;; diff --git a/shared/audiofolders/placeholder b/shared/audiofolders/placeholder new file mode 100644 index 000000000..e69de29bb