Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chapter picture frame #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

None yet

1 participant