aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Resource.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/src/Resource.hs')
-rw-r--r--compiler/src/Resource.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs
index 6b4b44c..f59eed6 100644
--- a/compiler/src/Resource.hs
+++ b/compiler/src/Resource.hs
@@ -134,11 +134,11 @@ buildGalleryTree processItem processThumbnail tagsFromDirsConfig =
134 mkGalleryItem [] 134 mkGalleryItem []
135 where 135 where
136 mkGalleryItem :: [Tag] -> InputTree -> IO GalleryItem 136 mkGalleryItem :: [Tag] -> InputTree -> IO GalleryItem
137 mkGalleryItem inheritedTags InputFile{path, modTime, sidecar} = 137 mkGalleryItem inheritedTags InputFile{path, modTime, sidecar, thumbnailPath} =
138 do 138 do
139 let itemPath = "/" /> path 139 let itemPath = "/" /> path
140 properties <- processItem itemPath path 140 properties <- processItem itemPath path
141 processedThumbnail <- processThumbnail itemPath path 141 processedThumbnail <- processThumbnail itemPath (thumbnailPath ?? path)
142 return GalleryItem 142 return GalleryItem
143 { title = Input.title sidecar ?? fileName path ?? "" 143 { title = Input.title sidecar ?? fileName path ?? ""
144 , datetime = Input.datetime sidecar ?? toZonedTime modTime 144 , datetime = Input.datetime sidecar ?? toZonedTime modTime
@@ -148,12 +148,12 @@ buildGalleryTree processItem processThumbnail tagsFromDirsConfig =
148 , thumbnail = processedThumbnail 148 , thumbnail = processedThumbnail
149 , properties = properties } 149 , properties = properties }
150 150
151 mkGalleryItem inheritedTags InputDir{path, modTime, sidecar, dirThumbnailPath, items} = 151 mkGalleryItem inheritedTags InputDir{path, modTime, sidecar, thumbnailPath, items} =
152 do 152 do
153 let itemPath = "/" /> path 153 let itemPath = "/" /> path
154 let dirTags = (Input.tags sidecar ?? []) ++ inheritedTags 154 let dirTags = (Input.tags sidecar ?? []) ++ inheritedTags
155 processedItems <- parallel $ map (mkGalleryItem dirTags) items 155 processedItems <- parallel $ map (mkGalleryItem dirTags) items
156 processedThumbnail <- maybeThumbnail itemPath dirThumbnailPath 156 processedThumbnail <- maybeThumbnail itemPath thumbnailPath
157 return GalleryItem 157 return GalleryItem
158 { title = Input.title sidecar ?? fileName path ?? "" 158 { title = Input.title sidecar ?? fileName path ?? ""
159 , datetime = Input.datetime sidecar ?? mostRecentModTime processedItems 159 , datetime = Input.datetime sidecar ?? mostRecentModTime processedItems