msg_Dbg( p_intf, "requested to move playlist item %d to %d",
i_pos, i_newpos);
}
+ else if( !strcmp( s, "playlist_sort" ) )
+ {
+ int i_order = E_(SSPopN)( st, vars );
+ int i_sort = E_(SSPopN)( st, vars );
+ i_order = i_order % 2;
+ i_sort = i_sort % 9;
+ playlist_RecursiveNodeSort ( p_sys->p_playlist,
+ p_sys->p_playlist->p_general,
+ i_sort, i_order );
+ msg_Dbg( p_intf, "requested sort playlist by : %d in order : %d", i_sort, i_order );
+ }
else if( !strcmp( s, "vlc_volume_set" ) )
{
char *psz_vol = E_(SSPop)( st );
loadXMLDoc( 'requests/status.xml?command=pl_empty', parse_status );
setTimeout( 'update_playlist()', 1000 );
}
-function pl_sort()
+function pl_sort( sort, order )
{
- /* FIXME */
- loadXMLDoc( 'requests/status.xml?command=pl_sort', parse_status );
+ loadXMLDoc( 'requests/status.xml?command=pl_sort&id='+order+'&val='+sort, parse_status );
setTimeout( 'update_playlist()', 1000 );
}
function pl_shuffle()
document.getElementById( 'btn_pause' ).setAttribute( 'title', 'Play' );
}
- if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" )
- document.getElementById( 'btn_shuffle').setAttribute( 'class', 'on' );
- else
- document.getElementById( 'btn_shuffle').setAttribute( 'class', 'off' );
- if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" )
- document.getElementById( 'btn_loop').setAttribute( 'class', 'on' );
- else
- document.getElementById( 'btn_loop').setAttribute( 'class', 'off' );
- if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" )
- document.getElementById( 'btn_repeat').setAttribute( 'class', 'on' );
- else
- document.getElementById( 'btn_repeat').setAttribute( 'class', 'off' );
+ if( status.getElementsByTagName( 'random' )[0].firstChild.data == "1" )
+ document.getElementById( 'btn_shuffle').setAttribute( 'class', 'on' );
+ else
+ document.getElementById( 'btn_shuffle').setAttribute( 'class', 'off' );
+ if( status.getElementsByTagName( 'loop' )[0].firstChild.data == "1" )
+ document.getElementById( 'btn_loop').setAttribute( 'class', 'on' );
+ else
+ document.getElementById( 'btn_loop').setAttribute( 'class', 'off' );
+ if( status.getElementsByTagName( 'repeat' )[0].firstChild.data == "1" )
+ document.getElementById( 'btn_repeat').setAttribute( 'class', 'on' );
+ else
+ document.getElementById( 'btn_repeat').setAttribute( 'class', 'off' );
var tree = document.createElement( "ul" );
var categories = status.getElementsByTagName( 'category' );