diff --git a/index.php b/index.php old mode 100644 new mode 100755 index 811dd8f..77f9c4c --- a/index.php +++ b/index.php @@ -44,7 +44,7 @@ $queues = Queue::getList();
diff --git a/minimal.js b/minimal.js
index aef05f8..93f2f80 100755
--- a/minimal.js
+++ b/minimal.js
@@ -21,8 +21,9 @@ $(document).ready(function() {
});
$('#max_btn').click(function() { setSliderVolume(maxVolume); });
$('#min_btn').click(function() { setSliderVolume(minVolume); });
- $('#skipsong_btn').click(function() { skipSong($(this)); });
- $('#skipsong_playing_btn').click(function() { skipSong($(this)); });
+ //$('#skipsong_btn').click(function() { skipSong($(this)); });
+ //$('#skipsong_playing_btn').click(function() { skipSong($(this)); });
+ $('.skipsong_btn').click(function() { skipSong($(this)); });
$('#dropsong_btn').click(function() { dropSong($(this)); });
$('#mute_btn').click(function() { toggleMute($(this)); });
$('#mute_playing_btn').click(function() { toggleMute($(this)); });
@@ -169,6 +170,9 @@ function toggleChristmas(callingElement) {
success: function(data, stat, jqo) {
callingElement.removeClass("buttonactive");
updateChristmasButton(data.christmas);
+ },
+ error: function(jqo, stat, err) {
+ callingElement.removeClass("buttonactive");
}
});
}
@@ -341,20 +345,26 @@ function toggleMute(callingElement, show) {
success: function(data, stat, jqo) {
callingElement.removeClass("buttonactive");
updateMuteButton(data.muted);
+ },
+ error: function(jqo, stat, err) {
+ callingElement.removeClass("buttonactive");
}
});
}
function skipSong (callingElement) {
callingElement.blur();
- callingElement.addClass("buttonactive");
if ( gettingJukeboxList || gettingSongList ) return false;
+ callingElement.addClass("buttonactive");
$.ajax({
url: 'ajax_skipsong.php',
async: false,
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
getSongList();
+ },
+ error: function(jqo, stat, err) {
+ callingElement.removeClass("buttonactive");
}
});
}
@@ -368,6 +378,9 @@ function emptyJukebox (callingElement) {
callingElement.removeClass("buttonactive");
getJukeboxList();
//skipSong();
+ },
+ error: function(jqo, stat, err) {
+ callingElement.removeClass("buttonactive");
}
});
}
@@ -382,6 +395,9 @@ function dropSong (callingElement) {
success: function (data, stat, jqo) {
callingElement.removeClass("buttonactive");
getSongList();
+ },
+ error: function(jqo, stat, err) {
+ callingElement.removeClass("buttonactive");
}
});
}
diff --git a/scripts/homeaudio_utils.php b/scripts/homeaudio_utils.php
new file mode 100644
index 0000000..789a82b
--- /dev/null
+++ b/scripts/homeaudio_utils.php
@@ -0,0 +1,89 @@
+ 'jpg',
+ 'image/jpeg' => 'jpg',
+ 'image/png' => 'png',
+ 'image/gif' => 'gif'
+);
+
+function search() {
+ global $globaldbh, $argv;
+
+ $target = $argv[2];
+ switch ($target) {
+ case "song":
+ case "songs":
+ $terms = array();
+ for ( $i=3; $i