aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpacien2020-01-05 10:43:30 +0100
committerpacien2020-01-05 10:43:30 +0100
commit1a0f4b17fc77c4b330c43185a15230e67116a3aa (patch)
tree4eed3493dfc9a195eacdd634bf58f9b7fc262e1d
parent7da7ae1848a23b13ec4b258fd9e714c0f4943850 (diff)
downloadldgallery-1a0f4b17fc77c4b330c43185a15230e67116a3aa.tar.gz
compiler: rename max thumbnail size option
-rw-r--r--compiler/src/Compiler.hs2
-rw-r--r--compiler/src/Config.hs4
-rw-r--r--design-notes.md2
3 files changed, 4 insertions, 4 deletions
diff --git a/compiler/src/Compiler.hs b/compiler/src/Compiler.hs
index 0132b1a..4f2093b 100644
--- a/compiler/src/Compiler.hs
+++ b/compiler/src/Compiler.hs
@@ -106,7 +106,7 @@ compileGallery inputDirPath outputDirPath rebuildAll =
106 let cache = if invalidateCache || rebuildAll then skipCached else withCached 106 let cache = if invalidateCache || rebuildAll then skipCached else withCached
107 107
108 let itemProc = itemProcessor (pictureMaxResolution config) cache 108 let itemProc = itemProcessor (pictureMaxResolution config) cache
109 let thumbnailProc = thumbnailProcessor (thumbnailResolution config) cache 109 let thumbnailProc = thumbnailProcessor (thumbnailMaxResolution config) cache
110 let galleryBuilder = buildGalleryTree dirProcessor itemProc thumbnailProc (implicitDirectoryTag config) 110 let galleryBuilder = buildGalleryTree dirProcessor itemProc thumbnailProc (implicitDirectoryTag config)
111 resources <- galleryBuilder (galleryName config) inputTree 111 resources <- galleryBuilder (galleryName config) inputTree
112 112
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index ca3259f..9bb2860 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -44,7 +44,7 @@ data CompilerConfig = CompilerConfig
44 { galleryName :: String 44 { galleryName :: String
45 , ignoreFiles :: String 45 , ignoreFiles :: String
46 , implicitDirectoryTag :: Bool 46 , implicitDirectoryTag :: Bool
47 , thumbnailResolution :: Resolution 47 , thumbnailMaxResolution :: Resolution
48 , pictureMaxResolution :: Maybe Resolution 48 , pictureMaxResolution :: Maybe Resolution
49 } deriving (Generic, Show) 49 } deriving (Generic, Show)
50 50
@@ -53,7 +53,7 @@ instance FromJSON CompilerConfig where
53 <$> v .:? "galleryName" .!= "Gallery" 53 <$> v .:? "galleryName" .!= "Gallery"
54 <*> v .:? "ignoreFiles" .!= ".^" 54 <*> v .:? "ignoreFiles" .!= ".^"
55 <*> v .:? "implicitDirectoryTag" .!= False 55 <*> v .:? "implicitDirectoryTag" .!= False
56 <*> v .:? "thumbnailResolution" .!= (Resolution 400 400) 56 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400)
57 <*> v .:? "pictureMaxResolution" 57 <*> v .:? "pictureMaxResolution"
58 58
59 59
diff --git a/design-notes.md b/design-notes.md
index 6c4f5b3..809fd36 100644
--- a/design-notes.md
+++ b/design-notes.md
@@ -72,7 +72,7 @@ compiler:
72 ignoreFiles: .*\.txt # to ignore text files 72 ignoreFiles: .*\.txt # to ignore text files
73 implicitDirectoryTag: false # default 73 implicitDirectoryTag: false # default
74 74
75 thumbnailResolution: 75 thumbnailMaxResolution:
76 width: 400 # default 76 width: 400 # default
77 height: 400 # default 77 height: 400 # default
78 78