Skip to content

Comments

Add chapter picture frame#83

Open
AbeEstrada wants to merge 3 commits inton10v:mainfrom
AbeEstrada:chapter-image
Open

Add chapter picture frame#83
AbeEstrada wants to merge 3 commits inton10v:mainfrom
AbeEstrada:chapter-image

Conversation

@AbeEstrada
Copy link

@AbeEstrada AbeEstrada commented Sep 7, 2023

This allows to get the image from the chapter, useful for podcasts.

chapters := tag.GetFrames(tag.CommonID("Chapters"))
for _, f := range chapters {
    chapter, ok := f.(id3v2.ChapterFrame)
    if !ok {
        log.Fatal("Couldn't get chapter")
    }
    fmt.Println(chapter.Title.Text)
    fmt.Println(chapter.Artwork.MimeType)
    // If a chapter doesn't have an image, use the default artwork
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant