mirror of
https://github.com/SuperBFG7/ympd
synced 2025-10-28 04:17:40 +00:00
Feat: add all from search to a playlist
This commit is contained in:
@@ -432,8 +432,8 @@
|
||||
</form>
|
||||
<div class="input-group mr-2">
|
||||
<div class="input-group-prepend">
|
||||
<button id="searchAddAllSongs" class="btn btn-secondary rounded-right" data-href="{'cmd': 'addAllFromSearch', 'options': []}">Add all</button>
|
||||
<button id="searchAddAllSongsBtn" class="btn btn-secondary dropdown-toggle dropdown-toggle-split rounded-right hide" type="button" data-toggle="dropdown"></button>
|
||||
<button id="searchAddAllSongs" class="btn btn-secondary" data-href="{'cmd': 'addAllFromSearch', 'options': []}">Add all</button>
|
||||
<button id="searchAddAllSongsBtn" class="btn btn-secondary dropdown-toggle dropdown-toggle-split rounded-right" type="button" data-toggle="dropdown"></button>
|
||||
<div class="dropdown-menu bg-dark dropdown-menu-right px-2" id="searchAddAllSongsDropdown">
|
||||
<button type="button" class="btn btn-secondary btn-block">Add all to queue</button>
|
||||
<button type="button" class="btn btn-secondary btn-block">Add all to playlist</button>
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user