mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 16:41:59 +00:00
fix(mobile): store exposure time as string (#4589)
Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
ad5ba82f50
commit
2377df9dae
1 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,5 @@
|
|||
import 'package:isar/isar.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:immich_mobile/utils/builtin_extensions.dart';
|
||||
|
||||
part 'exif_info.g.dart';
|
||||
|
||||
|
@ -165,7 +164,11 @@ double? _exposureTimeToSeconds(String? s) {
|
|||
}
|
||||
final parts = s.split("/");
|
||||
if (parts.length == 2) {
|
||||
return parts[0].toDouble() / parts[1].toDouble();
|
||||
final numerator = double.tryParse(parts[0]);
|
||||
final denominator = double.tryParse(parts[1]);
|
||||
if (numerator != null && denominator != null) {
|
||||
return numerator / denominator;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue