]> git.sesse.net Git - vlc/blobdiff - modules/control/http/util.c
Provide more item meta data to HTTP RPN.
[vlc] / modules / control / http / util.c
index 65a36df6aedcc92a614ecd44086444f8d5cfa910..52cadd9b27a3c02e700cd23c737288f59847f04f 100644 (file)
@@ -384,10 +384,59 @@ void PlaylistListNode( intf_thread_t *p_intf, playlist_t *p_pl,
         else
             mvar_AppendNewVar( itm, "ro", "rw" );
 
-        sprintf( value, "%ld",
-                 (long) input_item_GetDuration( p_node->p_input ) );
+        sprintf( value, "%"PRId64, input_item_GetDuration( p_node->p_input ) );
         mvar_AppendNewVar( itm, "duration", value );
 
+        //Adding extra meta-information to each playlist item
+
+        psz = input_item_GetTitle( p_node->p_input );
+        mvar_AppendNewVar( itm, "title", psz );
+
+        psz = input_item_GetArtist( p_node->p_input );
+        mvar_AppendNewVar( itm, "artist", psz );
+
+        psz = input_item_GetGenre( p_node->p_input );
+        mvar_AppendNewVar( itm, "genre", psz );
+
+        psz = input_item_GetCopyright( p_node->p_input );
+        mvar_AppendNewVar( itm, "copyright", psz );
+
+        psz = input_item_GetAlbum( p_node->p_input );
+        mvar_AppendNewVar( itm, "album", psz );
+
+        psz = input_item_GetTrackNum( p_node->p_input );
+        mvar_AppendNewVar( itm, "track", psz );
+
+        psz = input_item_GetDescription( p_node->p_input );
+        mvar_AppendNewVar( itm, "description", psz );
+
+        psz = input_item_GetRating( p_node->p_input );
+        mvar_AppendNewVar( itm, "rating", psz );
+
+        psz = input_item_GetDate( p_node->p_input );
+        mvar_AppendNewVar( itm, "date", psz );
+
+        psz = input_item_GetURL( p_node->p_input );
+        mvar_AppendNewVar( itm, "url", psz );
+
+        psz = input_item_GetLanguage( p_node->p_input );
+        mvar_AppendNewVar( itm, "language", psz );
+
+        psz = input_item_GetNowPlaying( p_node->p_input );
+        mvar_AppendNewVar( itm, "now_playing", psz );
+
+        psz = input_item_GetPublisher( p_node->p_input );
+        mvar_AppendNewVar( itm, "publisher", psz );
+
+        psz = input_item_GetEncodedBy( p_node->p_input );
+        mvar_AppendNewVar( itm, "encoded_by", psz );
+
+        psz = input_item_GetArtURL( p_node->p_input );
+        mvar_AppendNewVar( itm, "art_url", psz );
+
+        psz = input_item_GetTrackID( p_node->p_input );
+        mvar_AppendNewVar( itm, "track_id", psz );
+
         mvar_AppendVar( s, itm );
     }
     else