]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/podcast.c
Removes trailing spaces. Removes tabs.
[vlc] / modules / demux / playlist / podcast.c
index 9bb23f6830db9a0d11c11f70f10b5afe57101f6c..60389dae9235531e1ba816d9c783a49b632b518b 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <ctype.h>                                              /* isspace() */
-
 #include <vlc/vlc.h>
-#include <vlc/input.h>
-#include <vlc/intf.h>
+#include <vlc_demux.h>
 
 #include "playlist.h"
 #include "vlc_xml.h"
@@ -54,9 +51,9 @@ int E_(Import_podcast)( vlc_object_t *p_this )
 {
     demux_t *p_demux = (demux_t *)p_this;
 
-    if( !isDemux( p_demux, "podcast" ) )
+    if( !demux2_IsForced( p_demux, "podcast" ) )
         return VLC_EGENERIC;
-    
+
     STANDARD_DEMUX_INIT_MSG( "using podcast reader" );
     p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
     p_demux->p_sys->p_playlist = NULL;
@@ -222,7 +219,7 @@ static int Demux( demux_t *p_demux )
                     psz_item_summary = strdup( psz_text );
                 }
                 SET_DATA( psz_item_date, "pubDate" )
-                SET_DATA( psz_item_category, "itunes:category" ) 
+                SET_DATA( psz_item_category, "itunes:category" )
                 SET_DATA( psz_item_duration, "itunes:duration" )
                 SET_DATA( psz_item_keywords, "itunes:keywords" )
                 SET_DATA( psz_item_subtitle, "itunes:subtitle" )
@@ -230,12 +227,12 @@ static int Demux( demux_t *p_demux )
                 else if( b_item == VLC_FALSE && b_image == VLC_FALSE
                          && !strcmp( psz_elname, "title" ) )
                 {
-                    playlist_ItemSetName( p_current, psz_text );
+                    input_item_SetName( p_current_input, psz_text );
                 }
 #define ADD_GINFO( info, name ) \
     else if( !b_item && !b_image && !strcmp( psz_elname, name ) ) \
     { \
-        input_ItemAddInfo( p_current->p_input, _("Podcast Info"), \
+        input_ItemAddInfo( p_current_input, _("Podcast Info"), \
                                 _( info ), "%s", psz_text ); \
     }
                 ADD_GINFO( "Podcast Link", "link" )
@@ -248,7 +245,7 @@ static int Demux( demux_t *p_demux )
                          && ( !strcmp( psz_elname, "itunes:summary" )
                             ||!strcmp( psz_elname, "description" ) ) )
                 { /* <description> isn't standard iTunes podcast stuff */
-                    input_ItemAddInfo( p_current->p_input,
+                    input_ItemAddInfo( p_current_input,
                              _( "Podcast Info" ), _( "Podcast Summary" ),
                              "%s", psz_text );
                 }
@@ -291,10 +288,7 @@ static int Demux( demux_t *p_demux )
                                                 "%s bytes",
                                                 psz_item_size );
                     }
-                    playlist_BothAddInput( p_playlist, p_input,
-                                           p_item_in_category,
-                                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE
-                                           , PLAYLIST_END, NULL, NULL );
+                    input_ItemAddSubItem( p_current_input, p_input );
                     FREENULL( psz_item_name );
                     FREENULL( psz_item_mrl );
                     FREENULL( psz_item_size );