htaglib-1.1.1: Bindings to TagLib, audio meta-data library

Copyright© 2015–2017 Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <markkarpov92@gmail.com>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Sound.HTagLib.Setter

Contents

Description

A high-level interface for writing audio meta data. You don't need to import this module directly, import Sound.HTagLib instead.

Synopsis

High-level API

data TagSetter #

A composable entity that can be used together with the setTags or the setTags' functions to write meta data to an audio file.

Note that in case of (for example):

titleSetter "foo" <> titleSetter "bar"

The first value wins.

setTags #

Arguments

:: MonadIO m 
=> FilePath

Path to audio file

-> Maybe ID3v2Encoding

Encoding for ID3v2 frames

-> TagSetter

Setter

-> m () 

Set tags in specified file using the given setter.

In the case of trouble HTagLibException will be thrown.

setTags' #

Arguments

:: MonadIO m 
=> FilePath

Path to audio file

-> Maybe ID3v2Encoding

Encoding for ID3v2 frames

-> FileType

Type of audio file

-> TagSetter

Setter

-> m () 

Similar to setTags, but you can also specify type of audio file explicitly (otherwise it's guessed from file extension).

Built-in setters

titleSetter :: Title -> TagSetter #

Setter for track title.

artistSetter :: Artist -> TagSetter #

Setter for track artist.

albumSetter :: Album -> TagSetter #

Setter for track album.

commentSetter :: Comment -> TagSetter #

Setter for track comment.

genreSetter :: Genre -> TagSetter #

Setter for track genre.

yearSetter :: Maybe Year -> TagSetter #

Setter for year tag, use Nothing to clear the field.

trackNumberSetter :: Maybe TrackNumber -> TagSetter #

Setter for track number, use Nothing to clear the field.