- psz_item_name = strdup( psz_text );
- }
- else if( b_item == VLC_TRUE
- && ( !strcmp( psz_elname, "itunes:author" )
- ||!strcmp( psz_elname, "author" ) ) )
- { /* <author> isn't standard iTunes podcast stuff */
- psz_item_author = strdup( psz_text );
- }
- else if( b_item == VLC_TRUE
- && ( !strcmp( psz_elname, "itunes:summary" )
- ||!strcmp( psz_elname, "description" ) ) )
- { /* <description> isn't standard iTunes podcast stuff */
- psz_item_summary = strdup( psz_text );
+ char **p;
+
+ if( !strcmp( psz_elname, "title" ) )
+ p = &psz_item_name;
+ else if( !strcmp( psz_elname, "itunes:author" ) ||
+ !strcmp( psz_elname, "author" ) )
+ /* <author> isn't standard iTunes podcast stuff */
+ p = &psz_item_author;
+ else if( !strcmp( psz_elname, "itunes:summary" ) ||
+ !strcmp( psz_elname, "description" ) )
+ /* <description> isn't standard iTunes podcast stuff */
+ p = &psz_item_summary;
+ else if( !strcmp( psz_elname, "pubDate" ) )
+ p = &psz_item_date;
+ else if( !strcmp( psz_elname, "itunes:category" ) )
+ p = &psz_item_category;
+ else if( !strcmp( psz_elname, "itunes:duration" ) )
+ p = &psz_item_duration;
+ else if( !strcmp( psz_elname, "itunes:keywords" ) )
+ p = &psz_item_keywords;
+ else if( !strcmp( psz_elname, "itunes:subtitle" ) )
+ p = &psz_item_subtitle;
+ else
+ break;
+
+ free( *p );
+ *p = strdup( node );