mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-21 18:08:25 +00:00
Try streamline the different impls for MimeType
This commit is contained in:
@ -87,7 +87,7 @@ object Extraction {
|
||||
) *>
|
||||
OdfExtract.get(data).map(ExtractResult.fromEither)
|
||||
|
||||
case mt @ MimeType("text", sub, _) if !sub.contains("html") =>
|
||||
case MimeType.NonHtmlText(mt) =>
|
||||
val cs = mt.charsetOrUtf8
|
||||
logger.info(s"File detected as ${mt.asString}. Returning itself as text.") *>
|
||||
data.through(Binary.decode(cs)).foldMonoid.compile.last.map { txt =>
|
||||
|
Reference in New Issue
Block a user