Taglib v0.2.0 Taglib

Elixir bindings for Taglib.

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

Examples

iex> {:ok, ref} = Taglib.new("song.mp3")
{:ok, ""}
iex> Taglib.tag_title(ref)
"Mi Mujer"
iex> Taglib.audio_length(ref)
438

Summary

Functions

Returns the cover-art picture for the given fileref

Returns the audio length for the given fileref

Create a new file reference for the given filepath

Returns the album for the given fileref

Returns the artist for the given fileref

Returns the genre for the given fileref

Returns the title for the given fileref

Returns the track number for the given fileref

Returns the year for the given fileref

Types

fileref()
fileref() :: term
mimetype()
mimetype() :: String.t

Functions

artwork_picture(ref)
artwork_picture(fileref) :: {mimetype, binary}

Returns the cover-art picture for the given fileref.

audio_length(ref)
audio_length(fileref) :: Integer.t

Returns the audio length for the given fileref.

new(path)
new(Path.t) :: {:ok, fileref} | {:error, :invalid_file}

Create a new file reference for the given filepath.

tag_album(ref)
tag_album(fileref) :: String.t

Returns the album for the given fileref.

tag_artist(ref)
tag_artist(fileref) :: String.t

Returns the artist for the given fileref.

tag_genre(ref)
tag_genre(fileref) :: String.t

Returns the genre for the given fileref.

tag_title(ref)
tag_title(fileref) :: String.t

Returns the title for the given fileref.

tag_track(ref)
tag_track(fileref) :: Integer.t

Returns the track number for the given fileref.

tag_year(ref)
tag_year(fileref) :: Integer.t

Returns the year for the given fileref.