Skip to content

Commit a05ec4f

Browse files
committed
tttool assemble: Also look for mp3 files
This implements part 1 of #47.
1 parent ecf9909 commit a05ec4f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tttool.hs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,9 @@ fileMagics =
543543
, (BC.pack "OggS", "ogg")
544544
, (BC.pack "fLaC", "flac")]
545545

546+
decodeOnlyFiles :: [String]
547+
decodeOnlyFiles = ["mp3"]
548+
546549
decypher :: Word8 -> B.ByteString -> B.ByteString
547550
decypher x = B.map go
548551
where go 0 = 0
@@ -1296,7 +1299,7 @@ ttYaml2tt dir (TipToiYAML {..}) = do
12961299

12971300
files <- forM filenames' $ \fn -> do
12981301
let paths = [ combine dir relpath
1299-
| (_,ext) <- fileMagics
1302+
| ext <- map snd fileMagics ++ decodeOnlyFiles
13001303
, let pat = fromMaybe "%s" ttyMedia_Path
13011304
, let relpath = printf pat fn <.> ext
13021305
]

0 commit comments

Comments
 (0)