Skip to content
Snippets Groups Projects
Unverified Commit 8d9bba4e authored by Yassine Doghri's avatar Yassine Doghri
Browse files

refactor: clean episode analytics url by removing `podcasts/` prefix

parent 3a7d97d6
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
......@@ -77,6 +77,6 @@ class EpisodeAnalyticsController extends Controller
$serviceName,
);
return redirect()->to($this->config->getAudioFileUrl($audioFilePath));
return redirect()->to($this->config->getAudioFileUrl(['podcasts', ...$audioFilePath]));
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment