var old_time = 0;
var pl_cur_id;
+var albumart_id = -1;
/**********************************************************************
* Slider functions
{
elt = elt.parentNode;
if( ! elt.parentNode ) break;
+ pos = pos.parentNode;
}
if( ! elt.parentNode ) break;
elt = elt.parentNode.nextSibling;
{
var mrl = document.getElementById( 'input_mrl' );
- mrl.value = "fake:";
+ mrl.value = "fake://";
mrl.value += " :fake-file=" + value( "input_fake_filename" );
if( value( "input_fake_width" ) )
hide( 'browse' );
document.getElementById( value( 'browse_dest' ) ).focus();
}
-
+function refresh_albumart( force )
+{
+ if( albumart_id != pl_cur_id || force )
+ {
+ var now = new Date();
+ var albumart = document.getElementById( 'albumart' );
+ albumart.src = '/art?timestamp=' + now.getTime();
+ albumart_id = pl_cur_id;
+ }
+}
/**********************************************************************
* Periodically update stuff in the interface
*********************************************************************/
/* setTimeout( 'loop_refresh_playlist()', 10000 ); */
update_playlist();
}
+function loop_refresh_albumart()
+{
+ setTimeout( 'loop_refresh_albumart()', 1000 );
+ refresh_albumart( false );
+}
function loop_refresh()
{
setTimeout( 'loop_refresh_status()', 1 );
setTimeout( 'loop_refresh_playlist()', 1 );
+ setTimeout( 'loop_refresh_albumart()', 1 );
}