diff options
author | pacien | 2020-10-26 12:43:49 +0100 |
---|---|---|
committer | pacien | 2020-10-26 12:43:49 +0100 |
commit | 005ea7957a75e53b443bbc5a596909df457343b8 (patch) | |
tree | 1f981cdaa235aba17dc22c7b73ee605792ec97e5 /compiler/src/Compiler.hs | |
parent | 0b22af1a9eeabb3b592f44e6d0a8c8851339df3c (diff) | |
download | ldgallery-005ea7957a75e53b443bbc5a596909df457343b8.tar.gz |
compiler/Caching: fix cache thumbnail masking in index
GitHub: closes #280
Diffstat (limited to 'compiler/src/Compiler.hs')
-rw-r--r-- | compiler/src/Compiler.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs index 1ec55c5..4111f02 100644 --- a/compiler/src/Compiler.hs +++ b/compiler/src/Compiler.hs | |||
@@ -147,8 +147,8 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir | |||
147 | cachedIndex <- loadCachedIndex galleryIndexPath | 147 | cachedIndex <- loadCachedIndex galleryIndexPath |
148 | let cache = mkCache cachedIndex | 148 | let cache = mkCache cachedIndex |
149 | 149 | ||
150 | let itemProc = itemProcessor config (cache Resource.properties) | 150 | let itemProc = itemProcessor config (cache $ return . Resource.properties) |
151 | let thumbnailProc = thumbnailProcessor config (cache Resource.thumbnail) | 151 | let thumbnailProc = thumbnailProcessor config (cache $ fmap return . Resource.thumbnail) |
152 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) | 152 | let galleryBuilder = buildGalleryTree itemProc thumbnailProc (tagsFromDirectories config) |
153 | resources <- galleryBuilder curatedInputTree | 153 | resources <- galleryBuilder curatedInputTree |
154 | 154 | ||
@@ -170,7 +170,7 @@ compileGallery configPath inputDirPath outputDirPath outputIndexPath excludedDir | |||
170 | then return Nothing | 170 | then return Nothing |
171 | else loadGalleryIndex galleryIndexPath | 171 | else loadGalleryIndex galleryIndexPath |
172 | 172 | ||
173 | mkCache :: Maybe GalleryIndex -> (GalleryItem -> a) -> Cache a | 173 | mkCache :: Maybe GalleryIndex -> (GalleryItem -> Maybe a) -> Cache a |
174 | mkCache refGalleryIndex = | 174 | mkCache refGalleryIndex = |
175 | if rebuildAll | 175 | if rebuildAll |
176 | then const noCache | 176 | then const noCache |