Thanks again for continued support.
So I've had a look at the php file which creates the rss (wordpress plugin - now unsupported). I know that this is probably outside the scope of this forum, but If you have time I'd massively appreciate your opinion.
It seems as though the php code (see below) already tries to take account for iTunes wanting the absolute path for the file. I've tested the three '$media_name=' conditions below and the results I get are (in order):
- http://www.cwmpawd.org/pregethau/?show&url=Ioan%209%281-40%29%20RJ.mp3
- http://www.cwmpawd.org/wp-content/uploads/sermons/Ioan%209%281-40%29%20RJ.mp3
- http://www.cwmpawd.org/pregethau/?show&file_name=Ioan%209%281-40%29%20RJ.mp3
I take it that iTunes expects condition 2, but is actually getting condition 3? I don't want to hard code or force condition 2 in case any other podcast services are expecting 1 or 3. Any suggestions why iTunes isn't seeing what it's expecting?
Thanks in advance
// Convert filename to URL, perhaps with stats
// Stats have to be turned off for iTunes compatibility
function sb_podcast_file_url($media_name, $media_type) {
$user_agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : '';
if (stripos($user_agent, 'itunes') !== FALSE || stripos($user_agent, 'FeedBurner') !== FALSE || stripos($user_agent, 'AppleCoreMedia') !== FALSE)
$stats = FALSE;
else
$stats = TRUE;
if ($media_type == 'URLs') {
if ($stats)
$media_name=sb_display_url().sb_query_char().'show&url='.rawurlencode($media_name);
} else {
if (!$stats)
$media_name=trailingslashit(site_url()).ltrim(sb_get_option('upload_dir'), '/').rawurlencode($media_name);
else
$media_name=sb_display_url().sb_query_char().'show&file_name='.rawurlencode($media_name);
}
return sb_xml_entity_encode($media_name);
}
Regarding the filename formatting... I know :-( unfortunately I'm not the one responsible for this.