put CTOC before CHAPs

pull/3/head
joshua stein 2017-05-30 20:37:21 -05:00
rodzic b11df806b4
commit 5ee370f1ea
1 zmienionych plików z 5 dodań i 5 usunięć

Wyświetl plik

@ -103,6 +103,11 @@ func main() {
mp3.DeleteFrames("CTOC")
mp3.DeleteFrames("CHAP")
// build a new TOC referencing each chapter
ctocft := id3v2.V23FrameTypeMap["CTOC"]
toc := id3v2.NewTOCFrame(ctocft, "toc", true, true, tocchaps)
mp3.AddFrames(toc)
// add each chapter
chapft := id3v2.V23FrameTypeMap["CHAP"]
for _, c := range chaps {
@ -110,10 +115,5 @@ func main() {
mp3.AddFrames(ch)
}
// build a new TOC referencing each chapter
ctocft := id3v2.V23FrameTypeMap["CTOC"]
toc := id3v2.NewTOCFrame(ctocft, "toc", true, true, tocchaps)
mp3.AddFrames(toc)
mp3.Close()
}