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,12 +2394,15 @@ function selectTag(btnsEl, desc, setTo) {
|
|||||||
|
|
||||||
function addTagList(x, any) {
|
function addTagList(x, any) {
|
||||||
var tagList = '';
|
var tagList = '';
|
||||||
|
var tagBlacklist = ["Title", "MUSICBRAINZ_TRACKID", "Count", "Disc", "Comment", "Name"];
|
||||||
if (any == true)
|
if (any == true)
|
||||||
tagList += '<button type="button" class="btn btn-secondary btn-sm btn-block" data-tag="any">Any Tag</button>';
|
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++) {
|
for (var i = 0; i < settings.tags.length; i++) {
|
||||||
if (settings.tags[i] != 'Track') {
|
if (settings.tags[i] == 'Track')
|
||||||
tagList += '<button type="button" class="btn btn-secondary btn-sm btn-block" data-tag="' + settings.tags[i] + '">' + settings.tags[i] + '</button>';
|
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);
|
var tagListEl = document.getElementById(x);
|
||||||
tagListEl.innerHTML = tagList;
|
tagListEl.innerHTML = tagList;
|
||||||
|
Loading…
Reference in New Issue
Block a user