mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-24 03:09:22 -06:00
@@ -13,7 +13,7 @@ import PhotoSetIterator, {EmptyIterator} from './photo-set-iterator.js';
|
||||
import Viewport from './viewport.js';
|
||||
|
||||
const maxPhotoHeight = 300;
|
||||
const timeGroupThresholdMs = 5000;
|
||||
const timeGroupThresholdNs = 5 * 1e9;
|
||||
const photosPerPage = 10;
|
||||
const photoSpacing = 5;
|
||||
|
||||
@@ -163,7 +163,7 @@ export default class PhotoGrid extends React.Component<void, Props, State> {
|
||||
// Dedupe photos that were taken close together in time.
|
||||
// This is a stopgap until we have proper visual deduplication.
|
||||
// Note that not every photo has a taken timestamp and we always include those.
|
||||
if (!taken || ((lastTaken - taken.nsSinceEpoch) > timeGroupThresholdMs)) {
|
||||
if (!taken || ((lastTaken - taken.nsSinceEpoch) > timeGroupThresholdNs)) {
|
||||
const hash = nomsPhoto.hash.toString();
|
||||
const path = `.byDate[${negDate}][#${hash}]`;
|
||||
moreP.push(createPhoto(path, nomsPhoto));
|
||||
|
||||
@@ -57,8 +57,8 @@ const hasTitle = makeStructType('', {
|
||||
title: stringStruct,
|
||||
});
|
||||
|
||||
const hasExifTime = makeStructType('', {
|
||||
gphotoQ24exiftime: makeListType(stringStruct),
|
||||
const hasTimestamp = makeStructType('', {
|
||||
gphotoQ24timestamp: stringStruct,
|
||||
});
|
||||
|
||||
const hasFaces = makeStructType('', {
|
||||
@@ -117,11 +117,9 @@ async function main(): Promise<void> {
|
||||
photo.title = v.title.Q24t;
|
||||
}
|
||||
|
||||
if (isSubtype(hasExifTime, v.type)) {
|
||||
if (v.gphotoQ24exiftime.length === 1) {
|
||||
photo.dateTaken = getDate(parseInt(
|
||||
(await v.gphotoQ24exiftime.get(0)).Q24t, 10));
|
||||
}
|
||||
if (isSubtype(hasTimestamp, v.type)) {
|
||||
photo.dateTaken = getDate(parseInt(
|
||||
v.gphotoQ24timestamp.Q24t, 10));
|
||||
}
|
||||
|
||||
if (isSubtype(hasGeo, v.type)) {
|
||||
|
||||
Reference in New Issue
Block a user