mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 02:27:08 -04: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,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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user