File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -541,10 +541,11 @@ fileMagics :: [(B.ByteString, String)]
541541fileMagics =
542542 [ (BC. pack " RIFF" , " wav" )
543543 , (BC. pack " OggS" , " ogg" )
544- , (BC. pack " fLaC" , " flac" )]
544+ , (BC. pack " fLaC" , " flac" )
545+ , (BC. pack " ID3" , " mp3" )]
545546
546547decodeOnlyFiles :: [String ]
547- decodeOnlyFiles = [" mp3 " ]
548+ decodeOnlyFiles = []
548549
549550decypher :: Word8 -> B. ByteString -> B. ByteString
550551decypher x = B. map go
@@ -863,7 +864,7 @@ dumpAudioTo directory file = do
863864
864865 createDirectoryIfMissing False directory
865866 forMn_ (ttAudioFiles tt) $ \ n audio -> do
866- let audiotype = fromMaybe " raw" $ lookup ( B. take 4 audio) fileMagics
867+ let audiotype = maybe " raw" snd $ find ( \ (m,t) -> m `B.isPrefixOf` audio) fileMagics
867868 let filename = printf " %s/%s_%d.%s" directory (takeBaseName file) n audiotype
868869 if B. null audio
869870 then do
You can’t perform that action at this time.
0 commit comments