]> git.sesse.net Git - vlc/commitdiff
* modules/control/http.c: elements are now one level more recursive (if needed)
authorYoann Peronneau <yoann@videolan.org>
Fri, 4 Mar 2005 12:28:18 +0000 (12:28 +0000)
committerYoann Peronneau <yoann@videolan.org>
Fri, 4 Mar 2005 12:28:18 +0000 (12:28 +0000)
* share/http/vlm/index.html: we now display the state of media instances

modules/control/http.c
share/http/vlm/index.html

index 2d5eb1ecad95b440e3edae1bb88268c2e21b0c8b..84d03732722ee8dddb25695d49ff746e6878f85f 100644 (file)
@@ -1317,10 +1317,17 @@ static mvar_t *mvar_VlmSetNew( char *name, vlm_t *vlm )
                     /* fprintf( stderr, "        child=%s [%d]\n", ch->psz_name, ch->i_child ); */
                     for( c = 0; c < ch->i_child; c++ )
                     {
-                        mvar_t *in = mvar_New( ch->psz_name, ch->child[c]->psz_name );
-                        mvar_AppendVar( n, in );
-
-                        /* fprintf( stderr, "            sub=%s\n", ch->child[c]->psz_name );*/
+                        if( ch->child[c]->psz_value )
+                        {
+                            mvar_AppendNewVar( n, ch->child[c]->psz_name, ch->child[c]->psz_value );
+                            /* fprintf( stderr, "            sub=%s->%s\n", ch->child[c]->psz_name, ch->child[c]->psz_value ); */
+                        }
+                        else
+                        {
+                            mvar_t *in = mvar_New( ch->psz_name, ch->child[c]->psz_name );
+                            mvar_AppendVar( n, in );
+                            /* fprintf( stderr, "            sub=%s\n", ch->child[c]->psz_name ); */
+                        }
                     }
                     mvar_AppendVar( set, n );
                 }
index b210234fa19a8e6025092125aa5552d433afdb1a..e8de045ed407a5a5cde7fdedb35cf0d49fe002e0 100644 (file)
@@ -14,7 +14,7 @@
  </head>
  <body>
     <h2>
-     <a href="http://www.videolan.org/">VLC media player<vlc id="value" param1="version" /></a> (http interface)</h2>
+     <a href="http://www.videolan.org/">VLC media player <vlc id="value" param1="version" /></a> (http interface)</h2>
     <div class="sectitle">VLM - Configuration</div>
     <div class="section">
 
@@ -68,7 +68,9 @@
        <table>
         <tr>
          <td>
-          <vlc id="value" param1="el.state" />
+          <vlc id="foreach" param1="instance" param2="el.instances" />
+           <vlc id="value" param1="instance" />
+          <vlc id="end" />
          </td>
          <td align="right">
           <form method="get" action="" />