diff options
Diffstat (limited to 'compiler/src/Resource.hs')
-rw-r--r-- | compiler/src/Resource.hs | 8 |
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 | ||
33 | import Control.Concurrent.ParallelIO.Global (parallel) | 33 | import Control.Concurrent.ParallelIO.Global (parallel) |
34 | import Data.Function ((&)) | 34 | import Data.List ((\\), sortBy) |
35 | import Data.List ((\\), subsequences, sortBy) | ||
36 | import Data.Ord (comparing) | 35 | import Data.Ord (comparing) |
37 | import Data.Char (toLower) | 36 | import Data.Char (toLower) |
38 | import Data.Maybe (mapMaybe, fromMaybe) | 37 | import Data.Maybe (mapMaybe, fromMaybe) |
@@ -57,10 +56,7 @@ encodingOptions = JSON.defaultOptions | |||
57 | } | 56 | } |
58 | 57 | ||
59 | 58 | ||
60 | |||
61 | type Tag = String | 59 | type Tag = String |
62 | type FileSizeKB = Int | ||
63 | |||
64 | 60 | ||
65 | data Resolution = Resolution | 61 | data 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)) |