DCOP-Amarok-Playlist
view release on metacpan or search on metacpan
Playlist.pm view on Meta::CPAN
}
=item addMedia($URL)
Adds new media.
=cut
sub addMedia() {
my $self = shift;
while ( @_ ) {
$self->run( "addMedia", "$_" );
}
}
=item addMediaList()
Adds new media.
=cut
sub addMediaList() {
my $self = shift;
$self->run( "addMediaList", @_ );
}
=item clearPlaylist()
=cut
sub clearPlaylist() {
my $self = shift;
$self->run( "clearPlaylist" );
}
=item playByIndex($index)
Plays the song in the $index position.
=cut
sub playByIndex() {
my $self = shift;
my $index = shift;
$self->run( "playByIndex", "$index" );
}
=item playMedia($uri)
Play a specific object.
=cut
sub playMedia() {
my $self = shift;
my $url = shift;
$self->run( "playMedia", "$url" );
}
=item popupMessage($msg)
Pops up $msg in screen.
TODO: $msg has to escape white spaces with '\'.
e.g. "Hi\\\ there";
e.g2. 'I\ am\ here'
=cut
sub popupMessage() {
my $self = shift;
my $msg = shift;
$self->run( "popupMessage", "$msg" );
}
=item removeCurrentTrack()
Removes current track from playlist
=cut
sub removeCurrentTrack() {
my $self = shift;
$self->run( "removeCurrentTrack" );
}
=item repopulate()
Repopulate playlist.
=cut
sub repopulate() {
my $self = shift;
$self->run( "repopulate" );
}
=item saveM3uRelative($path)
Saves the M3U file with a relavtive path.
=cut
sub saveM3uRelative() {
my $self = shift;
my $path = shift;
$self->run( "saveM3u", "$path", "1" );
}
=item saveM3uAbsolute($path)
Saves the M3U file with an absolut path.
=cut
sub saveM3uAbsolute() {
my $self = shift;
my $path = shift;
$self->run( "saveM3u", "$path", "0" );
}
=item setStopAfterCurrent()
Enable StopAfterCurrent track.
=cut
sub setStopAfterCurrent() {
my $self = shift;
$self->run( "setStopAfterCurrent", "1" );
}
=item notStopAfterCurrent()
( run in 1.077 second using v1.01-cache-2.11-cpan-364913b4093 )