make #thumb smarter
This commit is contained in:
parent
849d893b86
commit
d360121efd
2 changed files with 15 additions and 10 deletions
|
@ -26,10 +26,7 @@ dependSingle' yaml info build nsfw =
|
|||
|
||||
|
||||
thumbnail :: Info -> FilePath
|
||||
thumbnail (Info {thumb = Just t}) = t
|
||||
thumbnail (Info {images})
|
||||
| Just i <- find #sfw images = #path i
|
||||
| otherwise = error "no thumbnail or sfw images"
|
||||
thumbnail = fromMaybe (error "no thumbnail or sfw images") . #thumb
|
||||
|
||||
addSuffix :: String -> FilePath -> FilePath
|
||||
addSuffix suf path =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue