diff --git a/htdocs/js/mpd.js b/htdocs/js/mpd.js
index 01fcaa7..bf26736 100644
--- a/htdocs/js/mpd.js
+++ b/htdocs/js/mpd.js
@@ -300,11 +300,11 @@ function webSocketConnect() {
"
"+ obj.data[song].album +" | " +
""+ minutes + ":" + (seconds < 10 ? '0' : '') + seconds +
" | | ";
- if (nrItems < tr.length) { $(tr[nrItems-1]).replaceWith(row); }
+ if (nrItems <= tr.length) { $(tr[nrItems-1]).replaceWith(row); }
else { $('#'+current_app+'List > tbody').append(row); }
}
for (var i=tr.length;i>nrItems;i--) {
- $(tr[tr.length-1]).remove();
+ $(tr[tr.length-1]).remove();
}
if (obj.type == 'queuesearch' && nrItems == 0) {
@@ -401,7 +401,7 @@ function webSocketConnect() {
if (nrItems == 0) {
$('#'+current_app+'List > tbody').append(
"error_outline | " +
- "No results | " +
+ "No playlists found. | " +
" | |
"
);
}
@@ -441,11 +441,11 @@ function webSocketConnect() {
' | ';
break;
}
- if (nrItems < tr.length) { $(tr[nrItems-1]).replaceWith(row); }
+ if (nrItems <= tr.length) { $(tr[nrItems-1]).replaceWith(row); }
else { $('#'+current_app+'List > tbody').append(row); }
}
for (var i=tr.length;i>nrItems;i--) {
- $(tr[tr.length-1]).remove();
+ $(tr[tr.length-1]).remove();
}
setPagination(obj.totalEntities);