preview: increase efficiency
parent
db125b5298
commit
0e17ef69a9
|
@ -155,9 +155,14 @@ class ApiBase extends Controller
|
|||
*/
|
||||
protected function getUserFile(int $fileId): ?File
|
||||
{
|
||||
// Don't check self for share token
|
||||
if ($this->getShareToken()) {
|
||||
return $this->getShareFile($fileId);
|
||||
}
|
||||
|
||||
// Check both user folder and album
|
||||
return $this->getUserFolderFile($fileId) ??
|
||||
$this->getAlbumFile($fileId) ??
|
||||
$this->getShareFile($fileId);
|
||||
$this->getAlbumFile($fileId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -148,11 +148,6 @@ const getPreviewUrl = function (
|
|||
`/apps/memories/api/image/preview/${photo.fileid}?c=${photo.etag}&x=${x}&y=${y}&a=${a}`
|
||||
);
|
||||
|
||||
// Albums from Photos
|
||||
if (vuerouter.currentRoute.name === "albums") {
|
||||
url += `&album=1`;
|
||||
}
|
||||
|
||||
// Public preview
|
||||
if (vuerouter.currentRoute.name === "folder-share") {
|
||||
const token = vuerouter.currentRoute.params.token;
|
||||
|
|
Loading…
Reference in New Issue