/*****************************************************************************
* 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"
{
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;
char *psz_item_subtitle = NULL;
char *psz_item_summary = NULL;
int i_type;
+ input_item_t *p_input;
INIT_PLAYLIST_STUFF;
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" )
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 ) ) \
{ \
- vlc_input_item_AddInfo( p_current->p_input, _("Podcast Info"), \
+ input_ItemAddInfo( p_current_input, _("Podcast Info"), \
_( info ), "%s", psz_text ); \
}
ADD_GINFO( "Podcast Link", "link" )
&& ( !strcmp( psz_elname, "itunes:summary" )
||!strcmp( psz_elname, "description" ) ) )
{ /* <description> isn't standard iTunes podcast stuff */
- vlc_input_item_AddInfo( p_current->p_input,
+ input_ItemAddInfo( p_current_input,
_( "Podcast Info" ), _( "Podcast Summary" ),
"%s", psz_text );
}
psz_item_name, 0, NULL, -1 );
if( p_input == NULL ) break;
#define ADD_INFO( info, field ) \
- if( field ) { vlc_input_item_AddInfo( p_input, \
+ if( field ) { input_ItemAddInfo( p_input, \
_( "Podcast Info" ), _( info ), "%s", field ); }
ADD_INFO( "Podcast Publication Date", psz_item_date );
ADD_INFO( "Podcast Author", psz_item_author );
ADD_INFO( "Podcast Type", psz_item_type );
if( psz_item_size )
{
- vlc_input_item_AddInfo( p_input,
+ input_ItemAddInfo( p_input,
_( "Podcast Info" ),
_( "Podcast Size" ),
"%s bytes",
psz_item_size );
}
- playlist_AddWhereverNeeded( p_playlist, p_input, p_current,
- p_item_in_category, (i_parent_id > 0 ) ? VLC_TRUE:
- VLC_FALSE, PLAYLIST_APPEND );
+ input_ItemAddSubItem( p_current_input, p_input );
FREENULL( psz_item_name );
FREENULL( psz_item_mrl );
FREENULL( psz_item_size );
}
HANDLE_PLAY_AND_RELEASE;
- return VLC_SUCCESS;
+ return -1; /* Needed for correct operation of go back */
}
static int Control( demux_t *p_demux, int i_query, va_list args )