1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-26 03:17:40 +00:00

Fix: advanced search tag selection

This commit is contained in:
jcorporation
2018-11-28 14:41:13 +00:00
parent 1e702d96b3
commit aa4c761da4
2 changed files with 7 additions and 5 deletions

View File

@@ -615,8 +615,10 @@ function appInit() {
}, false);
document.getElementById('searchtags').addEventListener('click', function(event) {
if (event.target.nodeName == 'BUTTON')
appGoto(app.current.app, app.current.tab, app.current.view, '0/' + event.target.getAttribute('data-tag') + '/' + app.current.search);
if (event.target.nodeName == 'BUTTON') {
app.current.filter = event.target.getAttribute('data-tag');
search(domCache.searchstr.value);
}
}, false);
document.getElementById('searchqueuestr').addEventListener('keyup', function(event) {
@@ -1727,7 +1729,7 @@ function parseSearch(obj) {
document.getElementById('panel-heading-search').innerText = obj.totalEntities + ' Songs found';
document.getElementById('cardFooterSearch').innerText = obj.totalEntities + ' Songs found';
}
else if (obj.returnedEntities < settings.maxElementsPerPage) {
else if (obj.returnedEntities + app.current.page < settings.maxElementsPerPage) {
document.getElementById('panel-heading-search').innerText = obj.returnedEntities + ' Songs found';
document.getElementById('cardFooterSearch').innerText = obj.returnedEntities + ' Songs found';
}