Merge branch 'master' of github.com:nixolas1/zoff

This commit is contained in:
Nicolas A. Tonne
2014-10-20 15:49:37 +02:00
2 changed files with 7 additions and 2 deletions

View File

@@ -38,7 +38,12 @@ if(isset($_REQUEST['thisUrl'])){
//array_shift($data["nowPlaying"]);
if(!is_null($np[0]["id"]) && !is_null($firstToAdd)){
array_shift($data["songs"]);
$data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
$q = $data["conf"];
$q = array_key_exists("delsongs", $q);
if(!$data["conf"]["delsongs"] || $q != 1)
{
$data["songs"][$np[0]["id"]] = array("id" => $np[0]["id"], "title" => $np[0]["title"], "votes" => $np[0]["votes"], "added" => time(), "guids" => array());
}
array_shift($data["nowPlaying"]);
$data["nowPlaying"][$firstSong[0]["id"]] = array("id" => $firstSong[0]["id"], "title" => $firstSong[0]["title"], "votes" => 0, "added" => $firstSong[0]["added"], "guids" => $firstSong[0]["guids"]);

View File

@@ -7,7 +7,7 @@
<label>Allow long songs <input type="checkbox" name="longSongs" value="1"></input></label>
<label>Show playlist on frontpage <input type="checkbox" name="frontPage" value="1"></input></label>
<label>Allow only music <input type="checkbox" name="onlyMusic" value="1"></input></label>
<label>Remove song after playing <input type="checkbox" name="onlyMusic" value="1"></input></label>
<label>Remove song after playing <input type="checkbox" name="removePlay" value="1"></input></label>
<input type="button" class="button" value="Save Settings" onclick="submitAdmin(this.form)">
</form>