floyd wrote:Is it possible to remove categories from the "Browse your library" windows?
Yes it is. I don't really suggest it because you have to modify a system file, but pretty sure it's possible. (I managed to change the order to put album and artist on top of the list).
The file is in /var/www/assets/js/runeui.js
The section you are looking for starts by "// render the Library home screen"
I modified this section so it looks like this:
- Code: Select all
// render the Library home screen
function renderLibraryHome() {
loadingSpinner('db');
$('#database-entries').addClass('hide');
$('#db-level-up').addClass('hide');
$('#db-homeSetup').removeClass('hide').removeClass('btn-primary').addClass('btn-default');
$('#home-blocks').removeClass('hide');
var obj = GUI.libraryhome,
i = 0,
content = '',
divOpen = '<div class="col-lg-3 col-md-4 col-sm-6">',
divClose = '</div>',
toggleMPD = '',
toggleSpotify = '',
notMPD = (obj.ActivePlayer === 'Spotify' || obj.ActivePlayer === 'Airplay');
content = '<div class="col-sm-12"><h1 class="txtmid">Browse your library</h1></div>';
// Set active player
setPlaybackSource();
if (notMPD) {
toggleMPD = ' inactive';
}
// bookmarks blocks
for (i = 0; (bookmark = obj.bookmarks[i]); i += 1) {
content += divOpen + '<div id="home-bookmark-' + bookmark.id + '" class="home-block home-bookmark' + toggleMPD + '" data-path="' + bookmark.path + '"><i class="fa fa-star"></i><h3>' + bookmark.name + '</h3>bookmark</div>' + divClose;
}
// Album list (static)
content += divOpen + '<div id="home-albums" class="home-block' + toggleMPD + '" data-path="Albums" data-browsemode="album"><i class="fa fa-dot-circle-o"></i><h3>Albums</h3>browse MPD database by album</div>' + divClose;
// Artist list (static)
content += divOpen + '<div id="home-artists" class="home-block' + toggleMPD + '" data-path="Artists" data-browsemode="artist"><i class="fa fa-users"></i><h3>Artists</h3>browse MPD database by artist</div>' + divClose;
if (chkKey(obj.networkMounts)) {
// network mounts block
if (obj.networkMounts === 0) {
if (notMPD) {
content += divOpen + '<div id="home-nas" class="home-block inactive"><i class="fa fa-sitemap"></i><h3>Network mounts (0)</h3>network attached storages</div>' + divClose;
} else {
content += divOpen + '<a class="home-block' + toggleMPD + '" href="/sources/add/"><i class="fa fa-sitemap"></i><h3>Network mounts (0)</h3>click to add some</a>' + divClose;
}
} else {
content += divOpen + '<div id="home-nas" class="home-block' + toggleMPD + '" data-path="NAS"><i class="fa fa-sitemap"></i><h3>Network mounts (' + obj.networkMounts + ')</h3>network attached storages</div>' + divClose;
}
}
if (chkKey(obj.localStorages)) {
// local storages block
if (obj.localStorages === 0) {
content += '';
} else {
content += divOpen + '<div id="home-local" class="home-block' + toggleMPD + '" data-path="LocalStorage"><i class="fa fa-hdd-o"></i><h3>LocalStorage (' + obj.localStorages + ')</h3>locally stored music</div>' + divClose;
}
}
if (chkKey(obj.USBMounts)) {
// USB mounts block
if (obj.USBMounts === 0) {
if (notMPD) {
content += divOpen + '<div id="home-usb" class="home-block inactive"><i class="fa fa-hdd-o"></i><h3>USB storage (0)</h3>no USB storage plugged</div>' + divClose;
} else {
content += divOpen + '<a id="home-usb" class="home-block' + toggleMPD + '" href="/sources"><i class="fa fa-hdd-o"></i><h3>USB storage (0)</h3>no USB storage plugged</a>' + divClose;
}
} else {
content += divOpen + '<div id="home-usb" class="home-block' + toggleMPD + '" data-path="USB"><i class="fa fa-hdd-o"></i><h3>USB storage (' + obj.USBMounts + ')</h3>USB attached drives</div>' + divClose;
}
}
if (chkKey(obj.webradio)) {
// webradios block
if (obj.webradio === 0) {
if (notMPD) {
content += divOpen + '<div id="home-webradio" class="home-block inactive"><i class="fa fa-microphone"></i><h3>My Webradios (0)</h3>webradio local playlists</div>' + divClose;
} else {
content += divOpen + '<a id="home-webradio" class="home-block' + toggleMPD + '" href="#" data-toggle="modal" data-target="#modal-webradio-add"><i class="fa fa-microphone"></i><h3>My Webradios (0)</h3>click to add some</a>' + divClose;
}
} else {
content += divOpen + '<div id="home-webradio" class="home-block' + toggleMPD + '" data-path="Webradio"><i class="fa fa-microphone"></i><h3>My Webradios (' + obj.webradio + ')</h3>webradio local playlists</div>' + divClose;
}
}
if (chkKey(obj.Spotify)) {
// Spotify block
if (obj.Spotify === '0') {
content += divOpen + '<a id="home-spotify" class="home-block' + toggleSpotify + '" href="/settings/#features-management"><i class="fa fa-spotify"></i><h3>Spotify<span id="home-count-spotify"></span></h3>click to configure</a>' + divClose;
} else {
if (obj.ActivePlayer !== 'Spotify') {
content += divOpen + '<div id="home-spotify-switch" class="home-block"><i class="fa fa-spotify"></i><h3>Spotify</h3>click to switch renderer</div>' + divClose;
} else {
content += divOpen + '<div id="home-spotify" class="home-block' + toggleSpotify + '" data-plugin="Spotify" data-path="Spotify"><i class="fa fa-spotify"></i><h3>Spotify</h3>music for everyone</div>' + divClose;
}
}
}
if (chkKey(obj.Dirble)) {
// Dirble block
content += divOpen + '<div id="home-dirble" class="home-block' + toggleMPD + '" data-plugin="Dirble" data-path="Dirble"><i class="fa fa-globe"></i><h3>Dirble <span id="home-count-dirble">(' + obj.Dirble + ')</span></h3>radio stations open directory</div>' + divClose;
}
// Jamendo (static)
content += divOpen + '<div id="home-jamendo" class="home-block' + toggleMPD + '" data-plugin="Jamendo" data-path="Jamendo"><i class="fa fa-play-circle-o"></i><h3>Jamendo<span id="home-count-jamendo"></span></h3>world\'s largest platform for free music</div>' + divClose;
// Genre list (static)
content += divOpen + '<div id="home-genre" class="home-block' + toggleMPD + '" data-path="Genres" data-browsemode="genre"><i class="fa fa-tags"></i><h3>Genres</h3>browse MPD database by genre</div>' + divClose;
content += '</div>';
document.getElementById('home-blocks').innerHTML = content;
loadingSpinner('db', 'hide');
$('span', '#db-currentpath').html('');
}
I don't know what will happen if you remove elements from there, but I'm willing to try it for you and send you the modified runeui.js file (if it works) if you're not comfortable doing it yourself.