View Source Id3vx.Tag (Id3vx v0.0.1-rc3)
Utility module for building ID3 tags and common frames conveniently.
Link to this section Summary
Functions
Add a picture to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Add a custom URL to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Add a text frame to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Add a typical Id3vx.Frame.Chapter
frame to a tag.
Change specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Change frames in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Create a new blank tag for a specific version of the ID3 spec.
Delete a chapter in a Id3vx.Tag
.
Delete frames in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Find specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Find specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Link to this section Types
@type t() :: %Id3vx.Tag{ extended_header: %Id3vx.ExtendedHeaderV3{ crc_data: term(), flags: term(), padding_size: term(), size: term() } | %Id3vx.ExtendedHeaderV4{flag_bytes: term(), flags: term(), size: term()}, flags: %Id3vx.TagFlags{ experimental: term(), extended_header: term(), footer: term(), unsynchronisation: term() }, footer: term(), frames: [Id3vx.Frame.t()], revision: integer(), size: integer(), version: 3 | 4 }
Link to this section Functions
add_attached_picture(container, description, mime_type, image_data, picture_type \\ :other)
View Source@spec add_attached_picture( container :: t() | Id3vx.Frame.Chapter.t(), description :: String.t(), mime_type :: String.t(), image_data :: binary(), picture_type :: atom() ) :: t() | Id3vx.Frame.Chapter.t()
Add a picture to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
@spec add_custom_url( container :: t() | Id3vx.Frame.Chapter.t(), description :: String.t(), url :: String.t() ) :: t() | Id3vx.Frame.Chapter.t()
Add a custom URL to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Typically used for Chapters.
@spec add_text_frame( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t(), text :: String.t() ) :: t() | Id3vx.Frame.Chapter.t()
Add a text frame to a Id3vx.Tag
or Id3vx.Frame.Chapter
.
add_typical_chapter_and_toc(tag, start_time, end_time, start_offset, end_offset, title, callback)
View Source@spec add_typical_chapter_and_toc( tag :: t(), start_time :: integer(), end_time :: integer(), start_offset :: integer(), end_offset :: integer(), title :: String.t(), callback :: (Id3vx.Frame.Chapter.t() -> Id3vx.Frame.Chapter.t()) ) :: t()
Add a typical Id3vx.Frame.Chapter
frame to a tag.
The callback gets the new chapter frame and is normally used to add sub-frames like text, links, pictures using the other tag-building utilities in this module.
It also creates a matching Table of Content frame and entry. Essentially it tries to take care of all the annoying bits.
@spec change_element( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t(), element_id :: String.t(), callback :: (... -> any()) ) :: t() | Id3vx.Frame.Chapter.t()
Change specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Runs the callback on all frames that match the frame ID and the element ID.
Returns the updated container.
@spec change_elements( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t(), callback :: (... -> any()) ) :: t() | Id3vx.Frame.Chapter.t()
Change frames in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Runs the callback on all frames that match the frame ID.
Returns the updated container.
Create a new blank tag for a specific version of the ID3 spec.
@spec delete_chapter( container :: t() | Id3vx.Frame.Chapter.t(), element_id :: String.t() ) :: t() | Id3vx.Frame.Chapter.t()
Delete a chapter in a Id3vx.Tag
.
Delete ToC element and chapter matching element ID.
Returns the updated container.
@spec delete_elements( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t() ) :: t() | Id3vx.Frame.Chapter.t()
Delete frames in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Deletes all frames matching frame ID.
Returns the updated container.
@spec find_element( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t() ) :: Id3vx.Frame.t() | nil
Find specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Returns the frame if anything matches the frame ID or nil if nothing was found.
@spec find_element( container :: t() | Id3vx.Frame.Chapter.t(), frame_id :: String.t(), element_id :: String.t() ) :: Id3vx.Frame.t() | nil
Find specific frame in a Id3vx.Tag
or Id3vx.Frame.Chapter
.
Returns the frame if anything matches the frame ID and element ID, or nil if nothing was found.