mirror of
https://github.com/SuperBFG7/ympd
synced 2024-12-26 02:50:26 +00:00
Fix: use AlbumArtist tag only if it found in enabled tags #69
This commit is contained in:
parent
58d1782cf7
commit
5f012c83a2
@ -959,6 +959,7 @@ function filterCols(x) {
|
|||||||
cols.push(settings[x][i]);
|
cols.push(settings[x][i]);
|
||||||
}
|
}
|
||||||
settings[x] = cols;
|
settings[x] = cols;
|
||||||
|
settings[x].sort();
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseSettings(obj) {
|
function parseSettings(obj) {
|
||||||
@ -1032,6 +1033,13 @@ function parseSettings(obj) {
|
|||||||
document.getElementsByClassName('mixramp')[0].style.display = '';
|
document.getElementsByClassName('mixramp')[0].style.display = '';
|
||||||
else
|
else
|
||||||
document.getElementsByClassName('mixramp')[0].style.display = 'none';
|
document.getElementsByClassName('mixramp')[0].style.display = 'none';
|
||||||
|
|
||||||
|
if (!obj.data.tags.includes('AlbumArtist') && obj.data.featTags) {
|
||||||
|
if (obj.data.tags.includes('Artist'))
|
||||||
|
app.apps.Browse.tabs.Database.active = 'Artist';
|
||||||
|
else
|
||||||
|
app.apps.Browse.tabs.Database.active = settings.tags[0];
|
||||||
|
}
|
||||||
|
|
||||||
document.getElementById('selectJukeboxMode').value = obj.data.jukeboxMode;
|
document.getElementById('selectJukeboxMode').value = obj.data.jukeboxMode;
|
||||||
document.getElementById('inputJukeboxQueueLength').value = obj.data.jukeboxQueueLength;
|
document.getElementById('inputJukeboxQueueLength').value = obj.data.jukeboxQueueLength;
|
||||||
@ -1053,6 +1061,7 @@ function parseSettings(obj) {
|
|||||||
document.getElementById('selectJukeboxPlaylist').innerHTML = '<option>Database</option>';
|
document.getElementById('selectJukeboxPlaylist').innerHTML = '<option>Database</option>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
settings.tags.sort();
|
||||||
filterCols('colsSearch');
|
filterCols('colsSearch');
|
||||||
filterCols('colsQueue');
|
filterCols('colsQueue');
|
||||||
filterCols('colsBrowsePlaylistsDetail');
|
filterCols('colsBrowsePlaylistsDetail');
|
||||||
@ -1107,6 +1116,8 @@ function setCols(table) {
|
|||||||
if (table == 'BrowseFilesystem')
|
if (table == 'BrowseFilesystem')
|
||||||
tags.push('Type');
|
tags.push('Type');
|
||||||
|
|
||||||
|
tags.sort();
|
||||||
|
|
||||||
for (var i = 0; i < tags.length; i++) {
|
for (var i = 0; i < tags.length; i++) {
|
||||||
tagChks += '<div class="form-check">' +
|
tagChks += '<div class="form-check">' +
|
||||||
'<input class="form-check-input" type="checkbox" value="1" name="' + tags[i] + '"';
|
'<input class="form-check-input" type="checkbox" value="1" name="' + tags[i] + '"';
|
||||||
@ -1120,13 +1131,11 @@ function setCols(table) {
|
|||||||
|
|
||||||
var heading = '';
|
var heading = '';
|
||||||
for (var i = 0; i < settings['cols' + table].length; i++) {
|
for (var i = 0; i < settings['cols' + table].length; i++) {
|
||||||
// if (tags.includes(settings['cols' + table][i])) {
|
var h = settings['cols' + table][i];
|
||||||
var h = settings['cols' + table][i];
|
heading += '<th draggable="true" data-col="' + h + '">';
|
||||||
heading += '<th draggable="true" data-col="' + h + '">';
|
if (h == 'Track' || h == 'Pos')
|
||||||
if (h == 'Track' || h == 'Pos')
|
h = '#';
|
||||||
h = '#';
|
heading += h + '</th>';
|
||||||
heading += h + '</th>';
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
heading += '<th></th>';
|
heading += '<th></th>';
|
||||||
document.getElementById(table + 'List').getElementsByTagName('tr')[0].innerHTML = heading;
|
document.getElementById(table + 'List').getElementsByTagName('tr')[0].innerHTML = heading;
|
||||||
@ -1812,8 +1821,12 @@ function songClick() {
|
|||||||
|
|
||||||
function artistClick() {
|
function artistClick() {
|
||||||
var albumartist = domCache.currentArtist.getAttribute('data-albumartist');
|
var albumartist = domCache.currentArtist.getAttribute('data-albumartist');
|
||||||
if (albumartist != '')
|
if (albumartist != '') {
|
||||||
appGoto('Browse', 'Database', 'AlbumArtist', '0/-/' + albumartist);
|
if (settings.tags.includes('AlbumArtist'))
|
||||||
|
appGoto('Browse', 'Database', 'AlbumArtist', '0/-/' + albumartist);
|
||||||
|
else if (settings.tags.includes('Artist'))
|
||||||
|
appGoto('Browse', 'Database', 'Artist', '0/-/' + albumartist);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function albumClick() {
|
function albumClick() {
|
||||||
@ -2603,7 +2616,12 @@ function songChange(obj) {
|
|||||||
htmlNotification += obj.data.Artist;
|
htmlNotification += obj.data.Artist;
|
||||||
pageTitle += obj.data.Artist + ' - ';
|
pageTitle += obj.data.Artist + ' - ';
|
||||||
domCache.currentArtist.innerText = obj.data.Artist;
|
domCache.currentArtist.innerText = obj.data.Artist;
|
||||||
domCache.currentArtist.setAttribute('data-albumartist', obj.data.AlbumArtist);
|
if (obj.data.AlbumArtist != undefined)
|
||||||
|
domCache.currentArtist.setAttribute('data-albumartist', obj.data.AlbumArtist);
|
||||||
|
else if (obj.data.Artist != undefined)
|
||||||
|
domCache.currentArtist.setAttribute('data-albumartist', obj.data.Artist);
|
||||||
|
else
|
||||||
|
domCache.currentArtist.setAttribute('data-albumartist', '');
|
||||||
} else
|
} else
|
||||||
domCache.currentArtist.innerText = '';
|
domCache.currentArtist.innerText = '';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user