mirror of
https://github.com/ad-aures/castopod.git
synced 2026-04-15 04:27:46 +02:00
fix(op3): move op3 prefix to enclosure url instead of audio proxy
This commit is contained in:
parent
94ceba6081
commit
d580369235
4 changed files with 40 additions and 30 deletions
|
|
@ -20,6 +20,7 @@ use CodeIgniter\HTTP\IncomingRequest;
|
|||
use CodeIgniter\HTTP\RedirectResponse;
|
||||
use CodeIgniter\HTTP\RequestInterface;
|
||||
use CodeIgniter\HTTP\ResponseInterface;
|
||||
use CodeIgniter\HTTP\URI;
|
||||
use Config\Services;
|
||||
use Modules\Analytics\Config\Analytics;
|
||||
use Modules\PremiumPodcasts\Entities\Subscription;
|
||||
|
|
@ -166,6 +167,18 @@ class EpisodeAudioController extends Controller
|
|||
$subscription instanceof Subscription ? $subscription->id : null
|
||||
);
|
||||
|
||||
return redirect()->to($this->analyticsConfig->getAudioUrl($this->episode, $this->request->getGet()));
|
||||
$audioFileURI = new URI(service('file_manager')->getUrl($this->episode->audio->file_key));
|
||||
|
||||
$queryParams = [];
|
||||
foreach ($this->request->getGet() as $key => $value) {
|
||||
// do not include token in query params
|
||||
if ($key !== 'token') {
|
||||
$queryParams[$key] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$audioFileURI->setQueryArray($queryParams);
|
||||
|
||||
return redirect()->to((string) $audioFileURI);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue