packages feed

haskell-ffprobe 0.1.0.0 → 0.1.0.1

raw patch · 5 files changed

+17/−5 lines, 5 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -9,3 +9,7 @@ ## 0.1.0.0 - 2024-07-01  First release!++## 0.1.0.1 - 2024-08-10++Fixing handling of non-ascii characters in ffprobe's output
haskell-ffprobe.cabal view
@@ -5,9 +5,9 @@ -- see: https://github.com/sol/hpack  name:           haskell-ffprobe-version:        0.1.0.0+version:        0.1.0.1 synopsis:       Haskell bindings for ffprobe-description:    Please see the README on GitHub at <https://github.com/Arthi-chaud/haskell-ffprobe#readme>+description:    Use ffprobe data in Haskell. Checkout the README on GitHub for an example. category:       Bindings homepage:       https://github.com/Arthi-chaud/haskell-ffprobe#readme bug-reports:    https://github.com/Arthi-chaud/haskell-ffprobe/issues
src/FFProbe.hs view
@@ -4,7 +4,8 @@ ) where  import Data.Aeson (FromJSON, eitherDecodeStrict)-import Data.ByteString.Char8 (pack)+import Data.Text (pack)+import Data.Text.Encoding (encodeUtf8) import FFProbe.Data.Chapter (Chapter) import FFProbe.Data.Format (Format) import FFProbe.Data.Stream (Stream)@@ -25,5 +26,5 @@ ffprobe path = do     probeRes <- execFFProbe path     return $ case probeRes of-        Right rawJson -> eitherDecodeStrict (pack rawJson)+        Right rawJson -> eitherDecodeStrict (encodeUtf8 $ pack rawJson)         Left err -> Left err
test/FFProbe/TestFFProbe.hs view
@@ -25,3 +25,10 @@                 title (chapters ffprobeData !! 1) `shouldBe` Just "Middle"                 title (chapters ffprobeData !! 2) `shouldBe` Just "End"             )+    it "Should Succeed at parsing unicode characters" $ do+        res <- ffprobe "test/assets/test-unicode.mp4"+        shouldBeRight+            res+            ( \ffprobeData -> do+                title (head (chapters ffprobeData)) `shouldBe` Just "Début"+            )
test/Utils.hs view
@@ -1,4 +1,4 @@-module Utils where+module Utils (getAssetContent, shouldBeRight) where  import Data.ByteString import Test.Hspec.Expectations