aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/Config.hs
diff options
context:
space:
mode:
authorpacien2020-01-23 23:16:07 +0100
committerNotkea2020-01-26 22:06:24 +0100
commitcf91102432b1196b8f3c1fa388b3963948ad49a6 (patch)
treeeb7bfdcaca87f6233f15887cadcf92586fdec7fc /compiler/src/Config.hs
parent987eb81cb5d98262299c7917d752c54907cbbc33 (diff)
downloadldgallery-cf91102432b1196b8f3c1fa388b3963948ad49a6.tar.gz
compiler: add jpeg export quality setting
GitHub: closes #2
Diffstat (limited to 'compiler/src/Config.hs')
-rw-r--r--compiler/src/Config.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/src/Config.hs b/compiler/src/Config.hs
index d670aae..4446c14 100644
--- a/compiler/src/Config.hs
+++ b/compiler/src/Config.hs
@@ -41,6 +41,7 @@ data CompilerConfig = CompilerConfig
41 , tagsFromDirectories :: Int 41 , tagsFromDirectories :: Int
42 , thumbnailMaxResolution :: Resolution 42 , thumbnailMaxResolution :: Resolution
43 , pictureMaxResolution :: Maybe Resolution 43 , pictureMaxResolution :: Maybe Resolution
44 , jpegExportQuality :: Int
44 } deriving (Generic, Show) 45 } deriving (Generic, Show)
45 46
46instance FromJSON CompilerConfig where 47instance FromJSON CompilerConfig where
@@ -53,6 +54,7 @@ instance FromJSON CompilerConfig where
53 <*> v .:? "tagsFromDirectories" .!= 0 54 <*> v .:? "tagsFromDirectories" .!= 0
54 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400) 55 <*> v .:? "thumbnailMaxResolution" .!= (Resolution 400 400)
55 <*> v .:? "pictureMaxResolution" 56 <*> v .:? "pictureMaxResolution"
57 <*> v .:? "jpegExportQuality" .!= 80
56 58
57 59
58data GalleryConfig = GalleryConfig 60data GalleryConfig = GalleryConfig