add more categories to music library

Suggestions/requests/ideas for RuneAudio core features and functions

add more categories to music library

Postby dan0luc » 07 Dec 2015, 23:41

For large music collections browsing though the current setup of the library is a pain.
Here are a few sugestions for the library:
- Album Artist category (would be a great one for me)
- Recent Artist, Recent Album, Recent Songs would be nice
- Favorite (most played) Artist/Album/Songs would also help

Thanks
dan0luc
 
Posts: 1
Joined: 07 Dec 2015, 23:31

Re: add more categories to music library

Postby MickyGBanger » 06 Jan 2016, 02:46

+1000. I am proxy voting for 999 other people. You can trust me.

All good features. Most platforms have sort by album artist, or an option to group compilations into a compilations folder by picking up the compilation id-tag. Without this the library view for artists is huge, and a real mess with lots of artists who have only one song.
MickyGBanger
 
Posts: 2
Joined: 06 Jan 2016, 02:41

Re: add more categories to music library

Postby MickyGBanger » 06 Jan 2016, 02:57

Album Artist workaround

For now, you can get album artist view using MPod on iOS devices which gives album artist view by default.
MickyGBanger
 
Posts: 2
Joined: 06 Jan 2016, 02:41

Re: add more categories to music library

Postby floyd » 06 Feb 2016, 22:51

Is it possible to remove categories from the "Browse your library" windows?
floyd
 
Posts: 17
Joined: 31 May 2015, 06:54

Re: add more categories to music library

Postby BayleeWylie » 08 Feb 2016, 16:09

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.
Raspberry Pi 2
IQaudIO PI-DAC+
HifimeDIY U2 Sabre ES9023
Sennheiser HD598SE
User avatar
BayleeWylie
 
Posts: 33
Joined: 14 Jan 2016, 19:20
Location: Canada

Re: add more categories to music library

Postby floyd » 10 Feb 2016, 20:47

Thanks very much. I managed to rearrange and remove some categories in the library screen to get it how it like it. Thanks again

Image
floyd
 
Posts: 17
Joined: 31 May 2015, 06:54

Re: add more categories to music library

Postby BayleeWylie » 11 Feb 2016, 03:31

Glad I could help!
Raspberry Pi 2
IQaudIO PI-DAC+
HifimeDIY U2 Sabre ES9023
Sennheiser HD598SE
User avatar
BayleeWylie
 
Posts: 33
Joined: 14 Jan 2016, 19:20
Location: Canada

Re: add more categories to music library

Postby thedman! » 23 Nov 2017, 18:04

BayleeWylie wrote:
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.



The above worked for me. Ta.
thedman!
 
Posts: 62
Joined: 24 Mar 2016, 15:45

support RuneAudio Donate with PayPal


Return to Feature request

Who is online

Users browsing this forum: No registered users and 1 guest