Wanted to share a few UI tweaks

I am sure I did this “wrong”, but I could not stand a couple of clunky behaviors in the UI, and I thought I would share my solutions.

index.php, I added a redirect to the Browse panel after clearing queue:

[code]
// set UI notify
$_SESSION[‘notify’][‘title’] = ‘Clear Queue’;
$_SESSION[‘notify’][‘msg’] = ‘Play Queue Cleared’;
// unlock session file
playerSession(‘unlock’);

    // go to browse
    echo "<script>window.location.href = '#panel-sx'</script>";[/code]

templates/indextpl.html, I made the social media and volume knob hidden, changed timeknob to centered:

<div class="social" style="visibility:hidden">

<div class="span12"> <div id="timeknob">

[code]

			 <div class="span12 volume" style="visibility:hidden">
				<input class="volumeknob" id="volume"[/code]

js/volumio.api.js, I made the playlist position and album blank when the playlist is blank or not playing:

[code] //Change Name according to Now Playing
if (GUI.currentartist != null && GUI.currentsong != null) {
document.title = objectInputState[‘currentsong’] + ’ - ’ + objectInputState[‘currentartist’] + ’ - ’ + ‘Volumio’;
if (GUI.playlist == null) {
$(’#playlist-position’).html(’ ');
}

} else {
	document.title = 'Volumio';
	$('#currentalbum').html('')
	$('#playlist-position').html('&nbsp;');
}[/code]

js/volumio.playback.js, I commented out the “remove from playlist” notification, as I thought it was very annoying:

// click on playlist actions $('.playlist').on('click', '.pl-action', function(event) { event.preventDefault(); var pos = $('.playlist .pl-action').index(this); var cmd = 'trackremove&songid=' + pos; // notify('remove', ''); sendPLCmd(cmd); });

I’d like to modify the Pnotify settings to be less intrusive in general, but I haven’t figured out how to do that yet.

Thanks very much for this great platform. My Pi will have a Pi-DAC+ (when it comes) and a 128GB flash drive for storage (and wifi, 2 blank USB for more storage). I love the built in AirPlay functionality. I can’t say the Spotify function does it for me, it’s just easier to use the app. The rest of my audio setup is a Jolida 202A with Klipsch KG4. Can’t wait.

Thanks,
Nate