npr / nprapi-wordpress

Access the NPR API from within WordPress. This repository is no longer being maintained. See the README for more information.
GNU General Public License v2.0
13 stars 30 forks source link

On push, find audio in custom meta field #10

Open rellison959 opened 9 years ago

rellison959 commented 9 years ago

To detect where audio URL is saved in META.

add one for text box to the push config, asking for the name of a custom meta that a site uses to store an audio href. On every push, it’ll grab that meta and add it to the Xml being sent to the API.

CrookedNumber commented 9 years ago

Please try out the branch: audio_meta

Within that branch, you'll see an extra form element on /wp-admin/options-general.php?page=ds_npr_api, which allows you to set the name of the custom meta field you're using to push audio (e.g., urlmp3). On push, the plugin will look for that field on any post, and attach any audio found to the NPRML being pushed.

If this works, it can folded back into master -- though maybe not before dealing with https://github.com/npr/WP-DS-NPR-API/issues/11

eobanb commented 9 years ago

For the life of me I cannot get this to work. I've installed this branch, set the custom field in the settings, created a post, added the audio (just a string of the mp3 URL), checked the 'send to NPR one' checkbox, and although the post gets ingested, the audio does not get attached.

CrookedNumber commented 9 years ago

Hmmm ... This might not be the right solution for you. I created this branch just for WMFE, but abandoned it when Ryan no longer needed something this specific.

How do you usually attach audio to posts? (the more details, the better)

eobanb commented 9 years ago

We use Powerpress, which basically just creates a meta field for the post with the key 'enclosure' with the URL to the audio file and some other metadata. Here's an example:

http://wfiu.indiana.edu/podcasts/audio/amos/15/114.mp3 966526 audio/mpeg a:1:{s:8:"duration";s:7:"0:02:00";}

Edit: oops, I meant Powerpress, not podpress. More info here: https://wordpress.org/plugins/powerpress/

rellison959 commented 9 years ago

I was looking to possibly utilize this plugin as well. So a proper solution would be great!

Thanks, Ryan Ellison WMFE

On Jun 3, 2015, at 9:38 AM, Eoban Binder notifications@github.com wrote:

We use Podpress, which basically just creates a meta field for the post with the key 'enclosure' with the URL to the audio file and some other metadata. Here's an example:

http://wfiu.indiana.edu/podcasts/audio/amos/15/114.mp3 http://wfiu.indiana.edu/podcasts/audio/amos/15/114.mp3 966526 audio/mpeg a:1:{s:8:"duration";s:7:"0:02:00";}

— Reply to this email directly or view it on GitHub https://github.com/npr/WP-DS-NPR-API/issues/10#issuecomment-108417377.

eobanb commented 9 years ago

I actually thought WP-DS-NPR-API already supported Powerpress as of the 1.5.2 release...but I can't get it to attach the audio.

CrookedNumber commented 9 years ago

I actually thought WP-DS-NPR-API already supported Powerpress as of the 1.5.2 release...but I can't get it to attach the audio.

Indeed, it should . And I push OK with a local WP install + PowerPress. Closing this -- and dealing with it via DPRDS ticketing system. Will open a separate issue re: PowerPress if no luck.