mirror of
https://github.com/SuperBFG7/ympd
synced 2024-12-27 03:10:26 +00:00
Fix: filter tag list in "browse by"-button (hide track, title, etc.)
This commit is contained in:
parent
b8d422e564
commit
53dd32c7d8
@ -2394,13 +2394,16 @@ function selectTag(btnsEl, desc, setTo) {
|
||||
|
||||
function addTagList(x, any) {
|
||||
var tagList = '';
|
||||
var tagBlacklist = ["Title", "MUSICBRAINZ_TRACKID", "Count", "Disc", "Comment", "Name"];
|
||||
if (any == true)
|
||||
tagList += '<button type="button" class="btn btn-secondary btn-sm btn-block" data-tag="any">Any Tag</button>';
|
||||
for (var i = 0; i < settings.tags.length; i++) {
|
||||
if (settings.tags[i] != 'Track') {
|
||||
if (settings.tags[i] == 'Track')
|
||||
continue;
|
||||
if (any == false && tagBlacklist.indexOf(settings.tags[i]) > -1)
|
||||
continue;
|
||||
tagList += '<button type="button" class="btn btn-secondary btn-sm btn-block" data-tag="' + settings.tags[i] + '">' + settings.tags[i] + '</button>';
|
||||
}
|
||||
}
|
||||
var tagListEl = document.getElementById(x);
|
||||
tagListEl.innerHTML = tagList;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user