kopia lustrzana https://github.com/jcs/mp3chap
put CTOC before CHAPs
rodzic
b11df806b4
commit
5ee370f1ea
10
mp3chap.go
10
mp3chap.go
|
@ -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()
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue