Audio::MPD::Common::Item::Song - a song object with some audio tags


Back to Top


NAME

Audio::MPD::Common::Item::Song - a song object with some audio tags

Back to Top


VERSION

version 1.100430

Back to Top


DESCRIPTION

the Audio::MPD::Common::Item::Song manpage is more a placeholder with some attributes. Those attributes are taken from the song tags, so some of them can be empty depending on the file.

The constructor should only be called by the Audio::MPD::Common::Item manpage's constructor.

Back to Top


ATTRIBUTES

$song->album;

Album of the song.

$song->artist;

Artist of the song.

$song->date;

Last modification date of the song.

$song->disc;

Disc number of the album. This is a string to allow tags such as 1/2.

$song->file;

Path to the song. Only attribute which will always be defined.

$song->genre;

Genre of the song.

$song->id;

Id of the song in MPD's database.

$song->name;

Name of the song (for http streams).

$song->pos;

Position of the song in the playlist.

$song->title;

Title of the song.

$song->track;

Track number of the song.

$song->time;

Length of the song in seconds.

Back to Top


METHODS

my $str = $song->as_string;

Return a string representing $song. This string will be:

either "album = track = artist = title"
or "artist = title"
or "title"
or "file"

(in this order), depending on the existing tags of the song. The last possibility always exist of course, since it's a path.

This method is also used to automatically stringify the $song.

Back to Top


AUTHOR

  Jerome Quelin

Back to Top


COPYRIGHT AND LICENSE

This software is copyright (c) 2007 by Jerome Quelin.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

Back to Top

 Audio::MPD::Common::Item::Song - a song object with some audio tags