Commit e970f05f authored by Antoine Cellerier's avatar Antoine Cellerier

HTTP interface: Display estimated item time when available.

parent 49f3fdae
...@@ -458,6 +458,9 @@ void E_(PlaylistListNode)( intf_thread_t *p_intf, playlist_t *p_pl, ...@@ -458,6 +458,9 @@ void E_(PlaylistListNode)( intf_thread_t *p_intf, playlist_t *p_pl,
E_(mvar_AppendNewVar)( itm, "ro", "rw" ); E_(mvar_AppendNewVar)( itm, "ro", "rw" );
} }
sprintf( value, "%d", p_node->input.i_duration );
E_(mvar_AppendNewVar)( itm, "duration", value );
E_(mvar_AppendVar)( s, itm ); E_(mvar_AppendVar)( s, itm );
} }
else else
......
...@@ -71,7 +71,7 @@ This dialog needs the following dialogs to be fully functional: <none> ...@@ -71,7 +71,7 @@ This dialog needs the following dialogs to be fully functional: <none>
<div id="menu_sd" class="menu" > <div id="menu_sd" class="menu" >
<vlc id="rpn" param1="services_discovery" /> <vlc id="rpn" param1="services_discovery" />
<vlc id="foreach" param1="sd" param2="object" /> <vlc id="foreach" param1="sd" param2="object" />
<button onclick="pl_sd('<vlc id="value" param1="sd" />');hide_menu('menu_sd');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="<vlc id="value" param1="sd.name" />" ><vlc id="value" param1="sd.name" /></button><br/> <button onclick="pl_sd('<vlc id="value" param1="sd" />');hide_menu('menu_sd');" onmouseover="button_over(this);" onmouseout="button_out_menu(this);" title="Toggle <vlc id="value" param1="sd.name" />" ><vlc id="value" param1="sd.name" /></button><br/>
<vlc id="end" /> <vlc id="end" />
</div> </div>
</button> </button>
......
...@@ -557,6 +557,9 @@ function parse_playlist() ...@@ -557,6 +557,9 @@ function parse_playlist()
} }
pl.setAttribute( 'title', elt.getAttribute( 'uri' )); pl.setAttribute( 'title', elt.getAttribute( 'uri' ));
pl.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) ); pl.appendChild( document.createTextNode( elt.getAttribute( 'name' ) ) );
var duration = elt.getAttribute( 'duration' );
if( duration > 0 )
pl.appendChild( document.createTextNode( " (" + format_time( elt.getAttribute( 'duration' ) / 1000000 ) + ")" ) );
pos.appendChild( pl ); pos.appendChild( pl );
if( elt.getAttribute( 'ro' ) == 'rw' ) if( elt.getAttribute( 'ro' ) == 'rw' )
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<vlc id="end" /> <vlc id="end" />
<vlc id="if" param1="pl.type value 'Node' strcmp" /> <vlc id="if" param1="pl.type value 'Node' strcmp" />
<vlc id="rpn" param1="1 +" /> <vlc id="rpn" param1="1 +" />
<leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri value '&' '&amp;' str_replace" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" /> <leaf id="<vlc id="value" param1="pl.index" />" <vlc id="if" param1="pl.current" /> current="current" <vlc id="end" /> uri="<vlc id="value" param1="pl.uri value '&' '&amp;' str_replace" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" duration="<vlc id="value" param1="pl.duration" />" />
<vlc id="else" /> <vlc id="else" />
<node id="<vlc id="value" param1="pl.index" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" > <node id="<vlc id="value" param1="pl.index" />" name="<vlc id="value" param1="pl.name value '&' '&amp;' str_replace" />" ro="<vlc id="value" param1="pl.ro" />" >
<vlc id="if" param1="first_item value 0 ="/> <vlc id="if" param1="first_item value 0 ="/>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment