Add w/h to day response

old-stable24
Varun Patil 2022-10-15 12:23:31 -07:00
parent 6be7c76d81
commit 70c8249277
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,8 @@ trait TimelineQueryDays {
$row["fileid"] = intval($row["fileid"]);
$row["isvideo"] = intval($row["isvideo"]);
$row["dayid"] = intval($row["dayid"]);
$row["w"] = intval($row["w"]);
$row["h"] = intval($row["h"]);
if (!$row["isvideo"]) {
unset($row["isvideo"]);
}
@ -160,7 +162,7 @@ trait TimelineQueryDays {
// We don't actually use m.datetaken here, but postgres
// needs that all fields in ORDER BY are also in SELECT
// when using DISTINCT on selected fields
$query->select($fileid, 'f.etag', 'm.isvideo', 'vco.categoryid', 'm.datetaken', 'm.dayid')
$query->select($fileid, 'f.etag', 'm.isvideo', 'vco.categoryid', 'm.datetaken', 'm.dayid', 'm.w', 'm.h')
->from('memories', 'm')
->innerJoin('m', 'filecache', 'f', $this->getFilecacheJoinQuery($query, $folder, $recursive, $archive));

View File

@ -39,6 +39,10 @@ export type IPhoto = {
flag: number;
/** DayID from server */
dayid?: number;
/** Width of full image */
w?: number;
/** Height of full image */
h?: number;
/** Reference to day object */
d?: IDay;
/** Video flag from server */