Seriously-Simple-Podcasting icon indicating copy to clipboard operation
Seriously-Simple-Podcasting copied to clipboard

Podtrac URLs Not Displaying in Download Link of HTML 5 Player

Open itsjusteileen opened this issue 5 years ago • 2 comments

Verified Behavior When using the Podtrac URL prefixes, the prefix is added to the RSS feed URL but not to the URLs from the HTML 5 player including buttons for play and download.

To Reproduce Steps to reproduce the behavior:

  1. Go to site with Podtrac prefix active and visit an episode post with the player
  2. Hover over download link.
  3. In left corner of screen see Castos URL not Podtrac URL

Expected behavior The Podtrack link should be visible and active on all links for playing audio not just the RSS feed link.

Screenshots Screen-Shot-2020-02-12-at-2-28-08-PM Screen-Shot-2020-02-12-at-2-22-36-PM

Additional context This behavior provides inaccurate listen counts for users with primary audience traffic coming from browser and not via their RSS feed URL.

itsjusteileen avatar Feb 13 '20 22:02 itsjusteileen

@itsjusteileen I've found a workaround for this with using the ssp_episode_download_link filter.

The $media_prefix section was sourced from feed-podcast.php. It'd be nice to get this as a native feature.

function get_episode_download_link_with_media_prefix($link, $episode_id, $file) {
	$series_id = ssp_get_episode_series_id($episode_id);

	$media_prefix = get_option('ss_podcasting_media_prefix', '');
	if ($series_id && $series_id > 0) {
		$series_media_prefix = get_option('ss_podcasting_media_prefix_' . $series_id);
		if (false !== $series_media_prefix) {
			$media_prefix = $series_media_prefix;
		}
	}
	return parse_episode_url_with_media_prefix($link, $media_prefix);
}
add_filter('ssp_episode_download_link', 'get_episode_download_link_with_media_prefix', 10, 3);

maschill92 avatar May 05 '20 16:05 maschill92

@maschill92 Thanks for sharing that snippet. I'm copying @jonathanbossenger here to see if it can be added into a future PR.

itsjusteileen avatar May 06 '20 21:05 itsjusteileen