-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
My UI uses the name of a playlist as the unique identifier. When I want to fetch a playlist with this name I must currently use one of the following:
playlist = @mpd.playlists.find{ |pl| pl.name==playlistname }
playlist = MPD::Playlist.new( @mpd, playlist:playlistname )Using find feels gross because it instantiates all the playlists (maybe a great many) when I only need one. Using new feels gross because if I mistakenly ask for a playlist that does not exist it will be created.
I'd prefer to be able to do something like:
playlist = @mpd.playlist( playlistname )Does that seem reasonable?
Metadata
Metadata
Assignees
Labels
No labels