mpd v0.1.0 Mpd.Song View Source
Link to this section Summary
Functions
Checks if song filanem insensitively compares to a given query
Checks if song tags or filename insensitively compares to a given query
Parses a MPD song output to the appropriate stucture.
Puts a tag in a given song
Gets song summary
Gets song tag by name
Checks if song tags insensitively compares to a given query
Checks if a given song tag insensitively compares to a given query
Link to this section Types
Specs
Link to this section Functions
Specs
Checks if song filanem insensitively compares to a given query
Specs
Checks if song tags or filename insensitively compares to a given query
Specs
parse(binary()) :: Mpt.Song.t()
Parses a MPD song output to the appropriate stucture.
A common song output (using :currentsong
, for instance) has the following body
file: Rouge Pompier/Neve Campbell/10 Gaetan Mouillé.m4a
Last-Modified: 2020-05-21T04:19:18Z
Artist: Rouge Pompier
Album: Neve Campbell
Title: Gaetan Mouillé
Track: 10
Genre: French Pop
Date: 2020-03-20T07:00:00Z
Composer: Jessy Fuchs & Alexandre Portelance
Disc: 1
AlbumArtist: Rouge Pompier
Time: 141
duration: 140.829
Pos: 34
Id: 45
OK
he file: ...
entry is refered as the song URI's, the rests are song tags. Since these may vary depending files, it'a map.
Examples
iex> Mpd.Status.parse(str)
%Mpd.Status{
file: "Rouge Pompier/Neve Campbell/10 Gaetan Mouillé.m4a",
tags: %{
"Artist" => "Rouge Pompier",
"Album" => "Neve Campbell",
"Title" => "Gaetan Mouillé",
"Track" => "10",
"Genre" => "French Pop",
...
}
}
Specs
Puts a tag in a given song
Specs
Gets song summary
Specs
Gets song tag by name
Specs
Checks if song tags insensitively compares to a given query
Specs
Checks if a given song tag insensitively compares to a given query