fix: removed thubmnail and preview paths

Signed-off-by: Varun Raj <mailme@varunraj.in>
This commit is contained in:
Varun Raj
2024-08-31 17:14:34 +05:30
parent d35c1ca1dd
commit 992f12fc19
6 changed files with 0 additions and 12 deletions
@@ -14,10 +14,8 @@ const SELECT_ORPHAN_PHOTOS = (date: string, ownerId: string) =>
a."deviceId",
a."type",
a."originalPath",
a."previewPath",
a."isFavorite",
a."duration",
a."thumbnailPath",
a."encodedVideoPath",
a."originalFileName",
a."sidecarPath",
@@ -38,7 +36,6 @@ const SELECT_ORPHAN_PHOTOS = (date: string, ownerId: string) =>
aaa."albumsId" IS NULL
AND a."ownerId" = '${ownerId}'
AND a."localDateTime"::date = '${date}'
AND a."previewPath" IS NOT NULL
`);
export default async function handler(
@@ -33,10 +33,8 @@ export default async function handler(
deviceId: assets.deviceId,
type: assets.type,
originalPath: assets.originalPath,
previewPath: assets.previewPath,
isFavorite: assets.isFavorite,
duration: assets.duration,
thumbnailPath: assets.thumbnailPath,
encodedVideoPath: assets.encodedVideoPath,
originalFileName: assets.originalFileName,
sidecarPath: assets.sidecarPath,
@@ -55,7 +53,6 @@ export default async function handler(
lte(exif.dateTimeOriginal, endDateDate),
eq(assets.type, "VIDEO"),
eq(assets.ownerId, currentUser.id),
isNotNull(assets.previewPath),
));
return res.status(200).json(rows);
@@ -83,7 +83,6 @@ export default async function handler(
.selectDistinctOn([person.id], {
id: person.id,
name: person.name,
thumbnailPath: person.thumbnailPath,
birthDate: person.birthDate,
isHidden: person.isHidden,
updatedAt: person.updatedAt,
-1
View File
@@ -60,7 +60,6 @@ export default async function handler(
.select({
id: person.id,
name: person.name,
thumbnailPath: person.thumbnailPath,
birthDate: person.birthDate,
isHidden: person.isHidden,
updatedAt: person.updatedAt,
-2
View File
@@ -7,12 +7,10 @@ export const assets = pgTable('assets', {
deviceId: varchar('deviceId').notNull(),
type: varchar('type').notNull(),
originalPath: varchar('originalPath').notNull(),
previewPath: varchar('previewPath'),
fileCreatedAt: timestamp('fileCreatedAt', { withTimezone: true }).notNull(),
fileModifiedAt: timestamp('fileModifiedAt', { withTimezone: true }).notNull(),
isFavorite: boolean('isFavorite').default(false).notNull(),
duration: varchar('duration'),
thumbnailPath: varchar('thumbnailPath').default(''),
encodedVideoPath: varchar('encodedVideoPath').default(''),
// checksum: bytea('checksum').notNull(),
isVisible: boolean('isVisible').default(true).notNull(),
-2
View File
@@ -4,10 +4,8 @@ export interface IAsset {
deviceId: string;
type: string;
originalPath: string;
previewPath: string;
isFavorite: boolean;
duration: null;
thumbnailPath: string;
encodedVideoPath: string;
originalFileName: string;
sidecarPath: null;