further work on export favorites as playlist
This commit is contained in:
parent
69e42d7014
commit
49825a038f
@ -52,7 +52,7 @@ class ExportController extends Controller {
|
||||
/**
|
||||
* @NoAdminRequired
|
||||
*/
|
||||
public function index(): Response {
|
||||
public function index() {
|
||||
$xml = new SimpleXMLElement('<?xml version="1.0"?><playlist></playlist>');
|
||||
$xml->addAttribute('encoding', 'UTF-8');
|
||||
$trackList = $xml->addChild('trackList');
|
||||
@ -72,10 +72,12 @@ class ExportController extends Controller {
|
||||
|
||||
$export_name = '"' . $productName . ' Radio Favorites (' . $userName . ') (' . $dateTime->formatDate(time()) . ').xspf"';
|
||||
|
||||
header('Content-Type: application/xspf+xml');
|
||||
header('Content-Disposition: attachment; filename=' . $export_name);
|
||||
$response = new Response();
|
||||
$response->addHeader('Content-Type', 'application/xspf+xml');
|
||||
$response->addHeader('Content-Disposition', 'attachment; filename=' . $export_name);
|
||||
$response->render();
|
||||
//return new DataResponse($this->service->findAll($this->userId));
|
||||
return new Response($xml->asXML());
|
||||
return $response;
|
||||
//return $xml->asXML();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user