1
0
mirror of https://github.com/SuperBFG7/ympd synced 2025-10-21 08:57:40 +00:00

Feat: add all from search to a playlist

This commit is contained in:
jcorporation
2018-07-31 23:01:10 +01:00
parent d6a24d4531
commit 712966348e
3 changed files with 14 additions and 25 deletions

View File

@@ -1684,7 +1684,11 @@ function addAllFromSearch() {
function addAllFromSearchPlist(plist) {
if (app.current.search.length >= 2) {
sendAPI({"cmd":"MPD_API_SEARCH_ADD_PLIST", "data":{ "plist": plist, "filter": app.current.filter, "searchstr": app.current.search}});
var filter = app.current.filter;
if (filter == 'Any Tag')
filter = 'any';
sendAPI({"cmd":"MPD_API_SEARCH_ADD_PLIST", "data":{ "plist": plist, "filter": filter, "searchstr": app.current.search}});
showNotification('Added '+ parseInt(document.getElementById('panel-heading-search').innerText) +' songs from search to ' + plist, '', '', 'success');
}
}