From 95473c49acb94f3182a96a9d8b470f45212bb014 Mon Sep 17 00:00:00 2001 From: jq Date: Thu, 5 Apr 2007 18:21:00 +0000 Subject: [PATCH] [project @ 5841] adding comments --- lib/Audio/MPD/Playlist.pm | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/lib/Audio/MPD/Playlist.pm b/lib/Audio/MPD/Playlist.pm index 6ae30f5..71ad057 100644 --- a/lib/Audio/MPD/Playlist.pm +++ b/lib/Audio/MPD/Playlist.pm @@ -163,6 +163,16 @@ sub crop { # -- Playlist: changing playlist order +# +# $pl->shuffle(); +# +# Shuffle the current playlist. No return value. +# +sub shuffle { + my ($self) = @_; + $self->_mpd->_send_command("shuffle\n"); +} + # # $pl->swap( $song1, $song2 ); @@ -187,16 +197,23 @@ sub swapid { $self->_mpd->_send_command("swapid $from $to\n"); } -sub shuffle { - my ($self) = @_; - $self->_mpd->_send_command("shuffle\n"); -} +# +# $pl->move( $song, $newpos ); +# +# Move song number $song to the position $newpos. No return value. +# sub move { my ($self, $song, $pos) = @_; $self->_mpd->_send_command("move $song $pos\n"); } + +# +# $pl->moveid( $songid, $newpos ); +# +# Move song ID $songid to the position $newpos. No return value. +# sub moveid { my ($self, $song, $pos) = @_; $self->_mpd->_send_command("moveid $song $pos\n"); @@ -340,6 +357,11 @@ song currently playing. =over 4 +=item $pl->shuffle( ) + +Shuffle the current playlist. No return value. + + =item $pl->swap( $song1, $song2 ) Swap positions of song number C<$song1> and C<$song2> in the current @@ -354,17 +376,12 @@ current playlist. No return value. =item $pl->move( $song, $newpos ) -Move song number $song to the position $newpos. No return value. +Move song number C<$song> to the position C<$newpos>. No return value. =item $pl->moveid( $songid, $newpos ) -Move song ID $songid to the position $newpos. No return value. - - -=item $pl->shuffle() - -Shuffle the current playlist. No return value. +Move song ID C<$songid> to the position C<$newpos>. No return value. =item $pl->load( $playlist ) -- 2.11.4.GIT