Compare commits

...

2 commits

Author SHA1 Message Date
Neeraj Gupta 64a02bbc4a [mob] Bump version 0.8.108 2024-05-23 13:45:52 +05:30
Neeraj Gupta da4aa1b1b2 [mob][fix] Gracefully handle time value in double instead of int 2024-05-23 13:41:10 +05:30
3 changed files with 18 additions and 3 deletions

View file

@ -13,6 +13,7 @@ import "package:photos/service_locator.dart";
import 'package:photos/utils/date_time_util.dart';
import 'package:photos/utils/exif_util.dart';
import 'package:photos/utils/file_uploader_util.dart';
import "package:photos/utils/parse.dart";
//Todo: files with no location data have lat and long set to 0.0. This should ideally be null.
class EnteFile {
@ -131,8 +132,9 @@ class EnteFile {
localID = metadata["localID"];
title = metadata["title"];
deviceFolder = metadata["deviceFolder"];
creationTime = metadata["creationTime"] ?? 0;
modificationTime = metadata["modificationTime"] ?? creationTime;
creationTime = parseKeyAsInt(metadata, "creationTime", 0);
modificationTime =
parseKeyAsInt(metadata, "modificationTime", creationTime!);
final latitude = double.tryParse(metadata["latitude"].toString());
final longitude = double.tryParse(metadata["longitude"].toString());
if (latitude == null || longitude == null) {

View file

@ -0,0 +1,13 @@
import "package:flutter/foundation.dart";
int parseKeyAsInt(Map<String, dynamic> map, String key, int defaultValue) {
try {
return map[key] ?? defaultValue;
} catch (e) {
if (kDebugMode) {
print("Error parsing key $key as int: $e");
}
final double val = map[key] as double;
return val.toInt();
}
}

View file

@ -12,7 +12,7 @@ description: ente photos application
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 0.8.106+630
version: 0.8.108+632
publish_to: none
environment: