|
@@ 327-334 (lines=8) @@
|
| 324 |
|
} |
| 325 |
|
|
| 326 |
|
$nodes = $this->userFolder->getById($track->getFileId()); |
| 327 |
|
if(count($nodes) > 0 ) { |
| 328 |
|
// get the first valid node |
| 329 |
|
$node = $nodes[0]; |
| 330 |
|
|
| 331 |
|
$mime = $node->getMimeType(); |
| 332 |
|
$content = $node->getContent(); |
| 333 |
|
return new FileResponse(array('mimetype' => $mime, 'content' => $content)); |
| 334 |
|
} |
| 335 |
|
|
| 336 |
|
$r = new Response(); |
| 337 |
|
$r->setStatus(Http::STATUS_NOT_FOUND); |
|
@@ 353-360 (lines=8) @@
|
| 350 |
|
$album = $this->albumBusinessLayer->find($albumId, $this->userId); |
| 351 |
|
|
| 352 |
|
$nodes = $this->userFolder->getById($album->getCoverFileId()); |
| 353 |
|
if(count($nodes) > 0 ) { |
| 354 |
|
// get the first valid node |
| 355 |
|
$node = $nodes[0]; |
| 356 |
|
|
| 357 |
|
$mime = $node->getMimeType(); |
| 358 |
|
$content = $node->getContent(); |
| 359 |
|
return new FileResponse(array('mimetype' => $mime, 'content' => $content)); |
| 360 |
|
} |
| 361 |
|
|
| 362 |
|
$r = new Response(); |
| 363 |
|
$r->setStatus(Http::STATUS_NOT_FOUND); |