Module: TagLib

Defined in:
docs/taglib/base.rb

Overview

This is the top-level module of taglib-ruby.

Where to find what:

String Encodings

Sometimes, it is necessary to specify which encoding should be used to store strings in tags. For this, the following constants are defined:

  • TagLib::String::Latin1
  • TagLib::String::UTF16
  • TagLib::String::UTF16BE
  • TagLib::String::UTF8
  • TagLib::String::UTF16LE

For ID3v2 frames, you can also set a default text encoding globally using the ID3v2::FrameFactory.

Modifying attributes

Mutable Ruby types (String, Array) returned by TagLib cannot be modified in-place.

Examples:

Modifying an attribute in-place does not work

tag.title = 'Title'
tag.title
# => "Title"
tag.title << ' of the song'
# => "Title of the song"
tag.title
# => "Title"

You need to replace the existing attribute value

tag.title = 'Title'
tag.title
# => "Title"
tag.title = 'Title of the song'
tag.title
# => "Title of the song"

Defined Under Namespace

Modules: FLAC, ID3v1, ID3v2, MP4, MPEG, Ogg, RIFF Classes: AudioProperties, File, FileRef, Tag

Constant Summary

TAGLIB_MAJOR_VERSION =

Major version of TagLib the extensions were compiled against (major.minor.patch). Note that the value is not actually 0, but depends on the version of the installed library.

0
TAGLIB_MINOR_VERSION =

Minor version of TagLib the extensions were compiled against (major.minor.patch). Note that the value is not actually 0, but depends on the version of the installed library.

0
TAGLIB_PATCH_VERSION =

Patch version of TagLib the extensions were compiled against (major.minor.patch). Note that the value is not actually 0, but depends on the version of the installed library.

0