Audio:...::Song(3pm)

πŸ“¦
version 2.003 Β· 3 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Audio::MPD::Common::Item::Song β€” bestie edition πŸ’–

okay so this is the manual page for Audio::MPD::Common::Item::Song(3pm) from the User Contributed Perl Documentation, and it's literally just a song object that carries some audio tags around with it. group chat, listen up 🎧✨

✨ VERSION ✨

version 2.003 β€” that's the one we're on, periodt πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

Audio::MPD::Common::Item::Song is lowkey just a placeholder with some attributes attached. no cap. those attributes get yoinked straight from the song's tags, so some of them can be totally empty depending on the file β€” it's giving "depends on the vibe of the file" 🌸

okay important: the constructor should only be called by Audio::MPD::Common::Item's constructor. like, don't call it yourself, bestie, it's not for you πŸ™ˆ

πŸ‘‘ ATTRIBUTES πŸ‘‘

each one comes with its own format code, iykyk 🌈

album

Album of the song. (format code: %d) πŸ’Ώ

artist

Artist of the song. (format code: %a) 🎀

albumartist

Artist of the album. (format code: %A) 🎸

composer

Song composer. (format code: %C) 🎼

date

Last modification date of the song. (format code: %M) πŸ“…

disc

Disc number of the album. This is a string to allow tags such as "1/2". (format code: %D) πŸ’½

file

Path to the song. Only attribute which will always be defined. (format code: %f) πŸ“

genre

Genre of the song. (format code: %g) 🎡

id

Id of the song in MPD's database. (format code: %i) πŸ”‘

last_modified

Last time the song was modified. (format code: %m) ⏰

name

Name of the song (for http streams). (format code: %N) 🌐

performer

Song performer. (format code: %P) 🎭

pos

Position of the song in the playlist. (format code: %p) πŸ“

title

Title of the song. (format code: %t) 🏷️

track

Track number of the song. (format code: %n) πŸ”’

time

Length of the song in seconds. (format code: %l) βŒ›

added

Shows when song was added to the database. (format code: %o) πŸ†•


πŸ’… METHODS πŸ’…

as_string

my $str = $song->as_string( [$format] );

Return a string representing $song. 🫢 if $format is specified, use it to format the string. otherwise, the string returned 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. ✨

⚠️ WARNING: the format codes are not yet definitive and may be subject to change! no fr fr, they might switch up on you 😭

🌸 AUTHOR 🌸

Jerome Quelin β€” the icon, the moment, the legend πŸ‘‘

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. 🫢


and that's the whole page, bestie β€” this was perl v5.40.1 energy, dated 2025-04-11, and it ATE πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from