diff --git a/app/Entities/Episode.php b/app/Entities/Episode.php index 243586e0..9556b3e9 100644 --- a/app/Entities/Episode.php +++ b/app/Entities/Episode.php @@ -296,10 +296,13 @@ class Episode extends Entity { helper('analytics'); + // remove 'podcasts/' from audio file path + $strippedAudioFilePath = substr($this->audio_file_path, 9); + return generate_episode_analytics_url( $this->podcast_id, $this->id, - $this->audio_file_path, + $strippedAudioFilePath, $this->audio_file_duration, $this->audio_file_size, $this->audio_file_header_size, diff --git a/app/Libraries/Analytics/Controllers/EpisodeAnalyticsController.php b/app/Libraries/Analytics/Controllers/EpisodeAnalyticsController.php index 05ae1462..683dcbdc 100644 --- a/app/Libraries/Analytics/Controllers/EpisodeAnalyticsController.php +++ b/app/Libraries/Analytics/Controllers/EpisodeAnalyticsController.php @@ -77,6 +77,6 @@ class EpisodeAnalyticsController extends Controller $serviceName, ); - return redirect()->to($this->config->getAudioFileUrl($audioFilePath)); + return redirect()->to($this->config->getAudioFileUrl(['podcasts', ...$audioFilePath])); } }