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

Copyright© 2015–2016 Mark Karpov
LicenseBSD 3 clause
MaintainerMark Karpov <[email protected]>
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Sound.HTagLib.Setter

Contents

Description

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 Source #

Composable entity that can be used together with setTags or setTags' to write meta data to audio file.

Note that in case of (for example):

titleSetter "foo" <> titleSetter "bar"

The first value wins.

setTags Source #

Arguments

:: FilePath

Path to audio file

-> Maybe ID3v2Encoding

Encoding for ID3v2 frames

-> TagSetter

Setter

-> IO () 

Set tags in specified file using given setter.

In case of trouble HTagLibException will be thrown.

setTags' Source #

Arguments

:: FilePath

Path to audio file

-> Maybe ID3v2Encoding

Encoding for ID3v2 frames

-> FileType

Type of audio file

-> TagSetter

Setter

-> IO () 

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 Source #

Setter for track title.

artistSetter :: Artist -> TagSetter Source #

Setter for track artist.

albumSetter :: Album -> TagSetter Source #

Setter for track album.

commentSetter :: Comment -> TagSetter Source #

Setter for track comment.

genreSetter :: Genre -> TagSetter Source #

Setter for track genre.

yearSetter :: Maybe Year -> TagSetter Source #

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

trackNumberSetter :: Maybe TrackNumber -> TagSetter Source #

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