• Is it at all possible to include the same iTunes meta podcast information in the Atom feed as in the RSS feed? The reason I ask is that I am trying to have just one WordPress post have multiple media files, one audio and one video, each with their own separate podcast.

    Currently I’m having the audio in the RSS and the video in the Atom feed, but this is not desirable because the Atom feed does not include the Itunes meta information and also does not respect the Publish date but rather always uses the “last updated” instant. I would love to be able to have the Atom feed mirror the RSS in at least these two ways.

    I tried doing this myself by hacking some of the PHP files but I don’t know enough code to get this accomplished. I’m hoping it can be done. Thanks!

Viewing 15 replies - 1 through 15 (of 22 total)
  • Plugin Author ntm

    (@ntm)

    Do I understand it right? You want to have a RSS feed with posts which containing only audio episodes and one RSS feed with posts which containing only video episodes.
    One way to achieve this is to put the posts which containing video files in one category and the posts which containing only audio episodes into a different category.
    WP offers a RSS feed for each category like https://www.example.com/category/audiopodcasts/feed/ or https://www.example.com/category/videopodcasts/feed/ where audiopodcasts and videopodcasts are the slug names of the category names (if you do use the default permalink structure the addresses would look like https://www.example.com/?feed=rss2&cat=1).
    podPress adds all the iTunes information like in the main RSS feed or in the RSS feed with the name Podcast to the category feeds, too.

    You could additionally use the CategoryCasting feature of podPress which hides in Site Admin > Posts > Categories. You will see this feature if you edit a category. This feature gives you the possibility to changes the channel information of a category feed.

    Regards,
    Tim

    Thread Starter bstritesky

    (@bstritesky)

    You’ve understood it right. I could figure out category casting, but that just means I have to have twice as many posts. I would like to have just one post be able to create both podcasts, otherwise it could become a maintenance nightmare to have to modify multiple posts.

    It’s kind of possible by having the split between RSS2 for Audio and Atom for Video podcasts. I was just hoping there would be a way to include the itunes information in the Atom podcast.

    Thanks for all you do in maintaining PodPress.

    Plugin Author ntm

    (@ntm)

    The iTunes tags are RSS tags resp. a special namespace for RSS feeds.

    […]I would like to have just one post be able to create both podcasts, […]

    Now, I really understand what you want to do.

    Currently, podPress creates a feed with the name Enhanced Podcast which includes only posts which have .m4a or .m4v files as attachments. This feed is an ATOM feed.
    If your audio files are mp3 files and your video files are m4v files then you will get one feed which contains the posts with the mp3 files and one which contains the posts with the video files.
    It is important that the mp3 files are marked as attachments for the RSS feeds because RSS feeds have the disadvantage that their <item> elements can only have one enclosure and podPress will add only the marked files to the RSS feeds. (It is only possible to mark one file per post for RSS feeds.)
    podPress creates the Enhanced Podcast feed on the basis of the file name extensions and uses the ATOM feed schema because the comparable ATOM feed element (<entry>) can contain more than one enclosure. iTunes (the software on your computer) can handle ATOM feeds without these special iTunes tags and takes the information from the post and probably from the media files.
    Maybe this is a solution for you.

    If you want to hack podPress then should look into the podpress.php file and watch out for the add_feed() functions. For instance there is line $podpress_allowed_ext = Array('m4a', 'm4v'); where you can change easily the file name extensions for the filter and instead of the current subtitle of this feed you can change it to something else by modifying one of the following lines (add_filter('wp_title_rss', 'podpress_extend_m4x_feed_title');). podpress_extend_m4x_feed_title is simple function which return only the sub title. This function is in the podpress_feed_functions.php file but you can define such a function also in podpress.php.

    function podpress_extend_m4x_feed_title($title) {
    	return sprintf(__('%1$s - m4a/m4v Feed', 'podpress'), $title);
    }

    I know that you are not the only one who likes to make different feeds for different media file types. That is why it is possible that one of the next podPress versions might have additional settings which will make such hacks superfluous. (But I can not tell your when this version will be released. But I will add a notice to this thread when there is a usable beta version.)

    Regards,
    Tim

    Thread Starter bstritesky

    (@bstritesky)

    Thanks for this response. I actually did that hacking and it basically has the same result as just flagging the .mp4 (Video) to be included in the Atom version only. Either way it ends up in the Atom feed, just with a different feed path.

    I suppose the ultimate ideal solution would be to be able to specify multiple RSS2 podcasts within a single post. THAT would rock.

    In our situation, our church publishes both a sermon audio and sermon video podcast with a description. It would be very convenient to specify that the .mp3 media file goes to RSS2 Podcast for Audio and the .mp4 media file goes to RSS2 Podcast for Video, predefined already.

    I assume that this would require a lot of code change because the whole backbone of PodPress is built on the assumption of a single Podcast.

    Plugin Author ntm

    (@ntm)

    I assume that this would require a lot of code change because the whole backbone of PodPress is built on the assumption of a single Podcast.

    Well, I have not formed a complete idea yet. But I will probably build something with the file extension filter and maybe a dynamic table on the feed/iTunes settings page where it is possible to add/remove custom feeds, to set filter rules, the feed sub titles and the feed types – something to manage these custom feeds. That is probably a lot of work and the reason why I don’t want to say when it will be ready. But later (tomorrow) I will try to give you some hints on how to make this Enhanced Podcast feed a RSS feed.

    Regards,
    Tim

    Thread Starter bstritesky

    (@bstritesky)

    That would be wonderful. Thanks!

    The reason it would be great to specify separate feeds is that the two obviously have different titles (“EMBC Sermon Audio” and “EMBC Sermon Video”), but each can share the description, author, and so on.

    Plugin Author ntm

    (@ntm)

    A little how-to hack podPress files to get an custom RSS feed on the basis of media file name extensions:

    (Line numbers are valid if you use podPress 8.8.6.3)

    podpress.php line 237:

    add_feed('enhancedpodcast', 'podPress_do_feed_enhanced_podcast');

    ‘enhancedpodcast’ is the slug (name) of the feed. e.g. https://www.example.com/?feed=enhancedpodcast
    If you change it use only alpha-numeric ASCII characters (and no white spaces. Underscore and dashes are allowed.)

    podpress.php start at line 693
    old:

    function podPress_do_feed_enhanced_podcast($withcomments) {
    	// this function creates a ATOM feed which contains only posts which have m4a or m4v files attached with podPress
    	GLOBAL $wp_query, $podpress_allowed_ext;
    	podPress_addFeedHooks();
    	// get only posts with podPress attachments
    	define('PODPRESS_PODCASTSONLY', true);
    	// make sure that only the podPress attachment which is a torrent file will be an enclosure in the ATOM item
    	$podpress_allowed_ext = Array('m4a', 'm4v');
    	// get only posts with m4a/m4v files
    	podpress_only_posts_with_certain_files($wp_query, $podpress_allowed_ext);
    	add_filter('wp_title_rss', 'podpress_extend_m4x_feed_title');
    	if (!function_exists('do_feed_atom') OR TRUE == version_compare('2.3', $wp_version,'>')) {
    		load_template(ABSPATH.PLUGINDIR.'/podpress/wp-atom1.php');
    	} else {
    		do_feed_atom($withcomments);
    	}
    }

    a RSS feed with post with .mp4 files:
    new:

    function podPress_do_feed_enhanced_podcast($withcomments) {
    	// this function creates a RSS feed which contains only posts which have m4a or m4v files attached with podPress
    	GLOBAL $wp_query, $podpress_allowed_ext;
    	podPress_addFeedHooks();
    	// get only posts with podPress attachments
    	define('PODPRESS_PODCASTSONLY', true);
    	// make sure that only the podPress attachment which is a torrent file will be an enclosure in the RSS item
    	$podpress_allowed_ext = Array('mp4');
    	// get only posts with mp4 files
    	podpress_only_posts_with_certain_files($wp_query, $podpress_allowed_ext);
    	add_filter('wp_title_rss', 'podpress_extend_mp4_feed_title');
    	do_feed_rss2($withcomments);
    }

    add a function to modify the subtitle of this feed:

    function podpress_extend_mp4_feed_title() {
    	return sprintf(__('%1$s - mp4 Feed', 'podpress'), $title);
    }

    Furthermore modify the podpress_feed_functions.php file like this:
    old:

    if ( is_array($podpress_allowed_ext) ) {
    	if (FALSE == in_array($post->podPressMedia[$key]['ext'], $podpress_allowed_ext)) {
    		continue;
    	}
    }

    new:

    if ( is_array($podpress_allowed_ext) ) {
    	if (FALSE == in_array($post->podPressMedia[$key]['ext'], $podpress_allowed_ext)) {
    		continue;
    	} else {
    		$preferredFormat = true;
    	}
    }

    The new feed will have the description and other information from the feed/iTunes settings page of podPress.

    Plugin Author ntm

    (@ntm)

    BTW: I had a further idea and I will probably add this file extension filter to the Categoy Casting settings. It is probably the easiest way to implement this. Because the Category Casting settings are already the infrastructure – except the feed name add-on and the filter.
    It would be necessary to add the posts to the categories.

    Thread Starter bstritesky

    (@bstritesky)

    Your filtering integration enhancement sounds very nice indeed! I would just create two categories, audio and video, and ensure that both get listed in the single post. Then the filter would ensure that the Audio and Video podcasts are separate in their media content, but can share pretty much everything else, such as description, author, etc. Is my understanding correct? It would be nice to have free-text filtering options so that any file extension could be used.

    Plugin Author ntm

    (@ntm)

    I have uploaded 8.8.7 beta 3. It is the current Development Version. If you like to test this version and you how-to rollback if necessary then feel free to download it.

    This version has a possibility to limit the file types of the attachments in Category Feeds (currently only for RSS Feed).
    If your posts have both audio and video files and you want to have one Feed which contains the posts and only the audio files and one with posts with video files then add to your posts the categories e.g. “Audio Podcast” and “Video Podcast”. After you have create these categories (which may have different names), activate the CategoryCasting feature for each of these categories. At the end of the options table is a new select box for the file types. Select e.g. MP3-Audio for the “Audio Podcast” category and MP4-Video for the “Video Podcast” category. That’s it.
    You can find the link for each category at the beginning of the Category Casting sections. If the the Link has not your current permalink structure then empty this URl field and save the settings two times.
    Now, the “Video Podcast” feed should only contain posts of this category with MP4 files and so on …

    If you have tested already with these category feeds clear or update the cache of your feed reader software (e.g. if it is FireFox).

    8.8.7 beta 3 resp. 8.8.7 has in combination with WP 2.8+ multiple widgets support. This means that you need to configure the podPress widgets (again) after the upgrade.

    The Feed Buttons Widget in 8.8.7 will probably have some options for the Category Feeds.

    Regards,
    Tim

    Plugin Author ntm

    (@ntm)

    Now, the Feed Buttons widget of the current Development Version includes options to display links of the category feeds in the sidebar. These options are only visible if you have activated the CategoryCasting feature for at least one category.

    Thread Starter bstritesky

    (@bstritesky)

    Thanks for doing all this work. I’ll have to take a look at the development version when I have some spare time. I haven’t tested development versions before, but I imagine I should back up the MySQL database and the files before attempting to use the dev version?

    Plugin Author ntm

    (@ntm)

    Yes, you are right. Before you test the Development Version, you should make a backup and prepare a copy of the last stable version of podPress. The development version uses a different way to implement the widgets if you use podPress in combination with WP 2.8 or a newer version. This means that you need to configure the widgets after the upgrade (and the same if you make roll-back). The other modifications of a db entry will be the additional file type setting of the CategoryCasting feature.

    I definitely like hear your opinion about this new version.

    I will do some more tests myself in the next days and if you have suggestions or run into a problem I will try to add or fix it as quick as possible.

    Plugin Author ntm

    (@ntm)

    If you are using the XSPF player constants in podpress.php then you should save this file, too. The new podPress version will bring also changes in this area. (see the new podpress_xspf_config-sample.php file and the XSPF widgets settings)

    Hello, I have a similar dilemma. I am using Podpress 8.8.6.3 to manage the sermons from my church. I have been managing them direct on the website, but now we are promoting subscription via feed and I created an iTunes podcast. Most of the messages are part of a series, so I have ONE post wiht the Series name, then multiple MP3 in the post… the feed is only pulling ONE audio file. Since I didn’t understand most of what was written above, I would say I am looking for a very simple solution. I would like to continue to post them like I am because the workflow is much easier. Anyway this could work with Podpress or do I need to find another plugin?

    Appreciate any input, thank you!!!
    Dan Rollins
    https://www.strongdisciple.com

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘[Plugin: podPress] Possible to include itunes content in atom feed?’ is closed to new replies.