src/misc/vlm.c : export the current playlist item's index for each instance
[vlc.git] / src / misc / vlm.c
index 10a728e..bcfd1e9 100644 (file)
@@ -1683,6 +1683,9 @@ static vlm_message_t *vlm_Show( vlm_t *vlm, vlm_media_t *media,
             APPEND_INPUT_INFO( "chapter", "%d", Integer );
             APPEND_INPUT_INFO( "seekable", "%d", Bool );
 #undef APPEND_INPUT_INFO
+            asprintf( &psz_tmp, "%d", p_instance->i_index );
+            vlm_MessageAdd( msg_instance, vlm_MessageNew( "playlistindex", psz_tmp ) );
+            free( psz_tmp );
             vlm_MessageAdd( msg_child, msg_instance );
         }