Author Topic: Programatically Creating Enclosures  (Read 194 times)

techsupportrich

  • Newbie
  • *
  • Posts: 2
Programatically Creating Enclosures
« on: February 20, 2014, 07:47:53 pm »
I'm trying to automatically create podcast posts by scraping data from my SoundCloud podcast RSS feed, then using it to build the wordpress post. Getting the data and creating a wordpress post is straight forward enough. However, I'm having issues when it comes to creating the enclosure custom field.

I can't get the data to format correctly. PowerPress creates a new line for file size, format, length, and the embed code. When I add a string into the custom field, it's all one long line that PowerPress doesn't like at all.

Does anyone have any experience or advice when it comes to automatically creating the enclosure field in a way that PowerPress will understand?

I have written a more complex explanation of my problem here - http://wordpress.stackexchange.com/questions/135392/custom-fields-soundcloud-and-powerpress
« Last Edit: February 20, 2014, 08:12:30 pm by techsupportrich »

mgdell

  • Blubrry Support
  • Administrator
  • Hero Member
  • *****
  • Posts: 2500
  • Tech Support for Blubrry and RawVoice Inc
    • Mike Dell's World
Re: Programatically Creating Enclosures
« Reply #1 on: February 21, 2014, 08:21:29 am »
I know almost nothing about how Soundcloud does things. 

This sounds like something for a web developer to tackle. 

Blubrry offers custom development (see: http://create.blubrry.com/support/podcast-consulting-services/) and our guys might be able to come up with something for you.

-Mike

angelo

  • Custom Title
  • Administrator
  • Hero Member
  • *****
  • Posts: 3956
  • CIO, RawVoice
    • Angelo's Blog
Re: Programatically Creating Enclosures
« Reply #2 on: March 12, 2014, 01:52:49 pm »
I would check out the sourer code in this plugin for an example how to create enclosure data in the database: http://wordpress.org/plugins/powerpress-posts-from-mysql/developers/

Just a quick explanation, first three lines of the enclsoure field are organized by line. The 4th line is a serialized PHP array of key > value pairs, all specific meta data attributes for both itunes and powerpress. The most important would be 'duration', and the value should be in seconds.