From ed0b9eafc58ed7437f0a7ce862aa2f3187eb1fd2 Mon Sep 17 00:00:00 2001 From: "a. fox" Date: Wed, 8 Feb 2023 18:31:35 -0500 Subject: [PATCH] fixed minutes not being utilized in time info calculation --- .../DynamicWallpaperGenerator/ImageMetadataGenerator.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/WallpapperLib/DynamicWallpaperGenerator/ImageMetadataGenerator.swift b/Sources/WallpapperLib/DynamicWallpaperGenerator/ImageMetadataGenerator.swift index ba0c997..1905593 100644 --- a/Sources/WallpapperLib/DynamicWallpaperGenerator/ImageMetadataGenerator.swift +++ b/Sources/WallpapperLib/DynamicWallpaperGenerator/ImageMetadataGenerator.swift @@ -98,7 +98,8 @@ public class ImageMetadataGenerator { let timeItem = TimeItem() timeItem.imageIndex = self.getImageIndex(fileName: item.fileName) let hour = Calendar.current.component(.hour, from: time) - timeItem.time = Double(hour) / 24.0 + let min = Calendar.current.component(.minute, from: time) + timeItem.time = (Double(hour) / 24.0) + (Double(min) / 60.0 / 24.0) if sequenceInfo.timeItems == nil { sequenceInfo.timeItems = []