Taglib v0.2.3 Taglib View Source

Elixir bindings for Taglib.

This module provides a simple wrapper around the Taglib C++ API.

Examples

iex> {:ok, t} = Taglib.new("song.mp3")
{:ok, #Taglib<0.0.7.1219>}
iex> Taglib.title(t)
"Mi Mujer"
iex> Taglib.duration(t)
438

Link to this section Summary

Functions

Returns the album name of the song

Returns the artist name of the song

Returns the cover-art picture of the song

Returns true if the track is part of a compilation; elsewhise returns false

Returns the disc number of the song

Returns the audio length of the song

Returns the genre of the song

Creates a new file reference for the given path

Returns the tags of the song as map

Returns the title of the song

Returns the track number of the song

Returns the year of the song

Link to this section Types

Link to this type

mimetype() View Source
mimetype() :: String.t()

Link to this type

t() View Source
t() :: %Taglib{ptr: binary(), ref: reference()}

Link to this section Functions

Returns the album name of the song.

Link to this function

artist(taglib) View Source
artist(t()) :: String.t()

Returns the artist name of the song.

Link to this function

artwork(taglib) View Source
artwork(t()) :: {mimetype(), binary()}

Returns the cover-art picture of the song.

Link to this function

compilation(taglib) View Source
compilation(t()) :: boolean()

Returns true if the track is part of a compilation; elsewhise returns false.

Returns the disc number of the song.

Link to this function

duration(taglib) View Source
duration(t()) :: Integer.t()

Returns the audio length of the song.

Returns the genre of the song.

Link to this function

new(path) View Source
new(Path.t()) :: {:ok, t()} | {:error, term()}

Creates a new file reference for the given path.

Link to this function

props(taglib) View Source
props(t()) :: map()

Returns the tags of the song as map.

Returns the title of the song.

Returns the track number of the song.

Returns the year of the song.