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, 2 insertions, 6 deletions
diff --git a/compiler/src/Resource.hs b/compiler/src/Resource.hs
index b52522c..c09b77a 100644
--- a/compiler/src/Resource.hs
+++ b/compiler/src/Resource.hs
@@ -31,8 +31,7 @@ module Resource
31 31
32 32
33import Control.Concurrent.ParallelIO.Global (parallel) 33import Control.Concurrent.ParallelIO.Global (parallel)
34import Data.Function ((&)) 34import Data.List ((\\), sortBy)
35import Data.List ((\\), subsequences, sortBy)
36import Data.Ord (comparing) 35import Data.Ord (comparing)
37import Data.Char (toLower) 36import Data.Char (toLower)
38import Data.Maybe (mapMaybe, fromMaybe) 37import Data.Maybe (mapMaybe, fromMaybe)
@@ -57,10 +56,7 @@ encodingOptions = JSON.defaultOptions
57 } 56 }
58 57
59 58
60
61type Tag = String 59type Tag = String
62type FileSizeKB = Int
63
64 60
65data Resolution = Resolution 61data Resolution = Resolution
66 { width :: Int 62 { width :: Int
@@ -147,7 +143,7 @@ buildGalleryTree processDir processItem processThumbnail addDirTag galleryName i
147 where 143 where
148 maybeThumbnail :: Maybe Path -> IO (Maybe Path) 144 maybeThumbnail :: Maybe Path -> IO (Maybe Path)
149 maybeThumbnail Nothing = return Nothing 145 maybeThumbnail Nothing = return Nothing
150 maybeThumbnail (Just path) = processThumbnail path 146 maybeThumbnail (Just thumbnailPath) = processThumbnail thumbnailPath
151 147
152 aggregateChildTags :: [GalleryItem] -> [Tag] 148 aggregateChildTags :: [GalleryItem] -> [Tag]
153 aggregateChildTags = unique . concatMap (\item -> tags (item::GalleryItem)) 149 aggregateChildTags = unique . concatMap (\item -> tags (item::GalleryItem))