POE::C...lection(3pm)
π NAME π
okay so bestie, gather round: POE::Component::Client::MPD::Collection β it's the module that handles all the collection commands for you. yes, the whole collection. the vibes are immaculate. β¨
πΈ VERSION πΈ
this is version 2.001. iconic behavior, no notes. π
π¦ DESCRIPTION π¦
so like, POE::Component::Client::MPD::Collection is the one in charge of handling general purpose commands. they live in their own dedicated module because that makes code maintenance so much easier β separating your faves into their own little group chat, yk? π
to actually make those commands happen, you send the corresponding event to the POE::Component::Client::MPD session you created: that session is the main character and it's responsible for dispatching the event where it needs to go. and this part is serious, bestie: under no circumstance should you call subs or methods from this module directly. like, do not. it's giving chaos. π
go read POE::Component::Client::MPD's pod to learn how to deal with answers from those commands. that's your homework. π«Ά
coming up next is the full list of collection-related events accepted by POCOCM. let's get into it. π
π΅ RETRIEVING SONGS & DIRECTORIES π΅
coll.all_items( [$path] )
returns all Audio::MPD::Common::Items (both songs and directories, the whole squad) currently known by mpd. π
if $path is supplied (relative to mpd root, bestie β relative!), it restricts the retrieval to just the songs and dirs chilling in that directory.
coll.all_items_simple( [$path] )
returns all Audio::MPD::Common::Items (both songs and directories) currently known by mpd. same energy as above. β¨
if $path is supplied (relative to mpd root), it restricts the retrieval to songs and dirs in this directory.
/!\ β οΈ warning, bestie, pay attention: theAudio::MPD::Common::Item::Songobjects will only have their attributefilefilled. any other attribute will be empty. so do not use this sub for anything other than a quick scan! it's giving bare minimum and we respect that but we do not trust it. π
coll.items_in_dir( [$path] )
returns the items in the given $path. if no $path supplied, it does the thing on mpd's root directory instead, nbd. πΈ
heads up tho: this sub does not work recusrively on all directories. (recusrively β yes that's the original spelling, i'm not fixing it, i'm not a monster, i'm just the messenger π§)
π RETRIEVING THE WHOLE COLLECTION π
coll.all_albums( )
returns the list of all albums (strings) currently known by mpd. the whole discography, served fresh. π
coll.all_artists( )
returns the list of all artists (strings) currently known by mpd. everyone. the entire lineup. π
coll.all_titles( )
returns the list of all titles (strings) currently known by mpd. all the names, all of them. β
coll.all_files( )
returns a mpd_result event with the list of all filenames (strings) currently known by mpd. note the whole event situation β it's not just a return, it's a whole moment. π₯
π PICKING A SONG π
coll.song( $path )
returns the Audio::MPD::Common::Item::Song which corresponds to $path. one song. the one. main character energy. π
coll.songs_with_filename_partial( $string )
returns the Audio::MPD::Common::Item::Songs that contain $string somewhere in their path. partial matching, so like, it's giving "close enough, we'll find it". π¦
π SONGS, ALBUMS & ARTISTS RELATIONS π
coll.albums_by_artist( $artist )
returns all albums (strings) performed by $artist, or where $artist participated. so even a feature counts. we love a collaborative queen. β¨
coll.songs_by_artist( $artist )
returns all Audio::MPD::Common::Item::Songs performed by $artist. π
coll.songs_by_artist_partial( $artist )
returns all Audio::MPD::Common::Item::Songs performed by $artist. (same as the one up there, just with _partial energy β i report, you decide π)
coll.songs_from_album( $album )
returns all Audio::MPD::Common::Item::Songs appearing in $album. the full tracklist, periodt. π
coll.songs_from_album_partial( $string )
returns all Audio::MPD::Common::Item::Songs appearing in an album containing $string. fuzzy match but make it cute. πΈ
coll.songs_with_title( $title )
returns all Audio::MPD::Common::Item::Songs which title is exactly $title. exactly. no approximations. we're being precise today. β
coll.songs_with_title_partial( $string )
returns all Audio::MPD::Common::Item::Songs where $string is part of the title. now this one is the chill fuzzy one. π§
π«Ά AUTHOR π«Ά
Jerome Quelin β the legend, the moment, the whole reason. π
π 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. slay, honestly. π
okay that's the whole page bestie, we ate and left no crumbs β¨ β this was POE::C...lection(3pm) from the User Contributed Perl Documentation, built from perl v5.40.1, dated 2025-04-11. go forth and query your mpd collection, you're gonna be so good at it, i just know it π¦ππ
π¦ where this page comes from
- debian trixie: libpoe-component-client-mpd-perl 2.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpoe-component-client-mpd-perl 2.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpoe-component-client-mpd-perl 2.001-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms