pull/221/head
Varun Patil 2022-11-09 00:52:44 -08:00
parent 3229ee32f0
commit c41854e141
1 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,8 @@ declare(strict_types=1);
namespace OCA\Memories\Controller; namespace OCA\Memories\Controller;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
use OCP\AppFramework\Http\JSONResponse;
use OCP\AppFramework\Http\DataDisplayResponse; use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\JSONResponse;
class VideoController extends ApiBase class VideoController extends ApiBase
{ {
@ -55,7 +55,7 @@ class VideoController extends ApiBase
// Get file // Get file
$files = $this->rootFolder->getUserFolder($user->getUID())->getById($fileid); $files = $this->rootFolder->getUserFolder($user->getUID())->getById($fileid);
if (count($files) === 0) { if (0 === \count($files)) {
return new JSONResponse(['message' => 'File not found'], Http::STATUS_NOT_FOUND); return new JSONResponse(['message' => 'File not found'], Http::STATUS_NOT_FOUND);
} }
$file = $files[0]; $file = $files[0];
@ -72,7 +72,7 @@ class VideoController extends ApiBase
} }
// Make upstream request // Make upstream request
$ch = curl_init("http://localhost:9999/vod/$path/$profile"); $ch = curl_init("http://localhost:9999/vod/{$path}/{$profile}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HEADER, 0);