NAME
Audio::XMMSClient::Playlist - Playlists for Audio::XMMSClient
SYNOPSIS
use Audio::XMMSClient;
my $conn = Audio::XMMSClient->new($client_name);
$conn->connect or die $conn->get_last_error;
my $playlist = $conn->playlist($playlist_name);
$playlist->shuffle;
DESCRIPTION
This module provides an abstraction for Audio::XMMSClient's playlists.
METHODS
list_entries
my $result = $playlist->list_entries;
List playlists content.
create
my $result = $playlist->create;
Creates a new empty playlist.
current_pos
my $result = $playlist->current_pos;
Retrives the current position in the playlist.
shuffle
my $result = $playlist->shuffle;
Shuffles the playlist.
sort
my $result = $playlist->sort([qw/artist album tracknr/]);
Sorts the playlist according to the list of \@properties
.
clear
my $result = $playlist->clear;
Clears the playlist.
insert_id
my $result = $playlist->insert_id(2, 1337);
Insert a medialib $id
at given $position
.
insert_args
my $result = $playlist->insert_args(1, 'file://path/to/media/file.sid', 'subtune=2');
Insert a $url
at $position
with @args
.
insert_url
my $result = $playlist->insert_url(0, 'file://path/to/media/file.flac');
Insert $url
at $position
.
insert_encoded
my $result = $playlist->insert_encoded(5, $url);
Like "insert_url", except it expects $url
to be encoded already.
insert_collection
my $result = $playlist->insert_collection(5, $coll, [qw/artist album tracknr/]);
Queries the medialib for entries matching $collection
, orders the results by \@order
and inserts them at $position
.
add_id
my $result = $playlist->add_id(9667);
Add a medialib $id
to the end of the playlist.
add_args
my $result = $playlist->add_args('file:///path/to/media/file.sid', 'subtune=7');
Add a $url
with the given @args
to the playlists end.
add_url
my $result = $playlist->add_url('file:///path/to/media/file.flac');
Add a $url
to the end of the playlist.
add_encoded
my $result = $playlist->add_encoded($url);
Like "add_url", except it expects $url
to be encoded already.
add_collection
my $result = $playlist->add_collection($coll, [qw/artist album/]);
Query the medialib for entries matching $coll
, sort the results by \@order
and add the results to the end of the playlist.
move_entry
my $result = $playlist->move_entry(3, 0);
Moves a playlist entry from $current_position
to $new_position
.
remove_entry
my $result = $playlist->remove_entry(6);
Removes the playlist entry at $position
.
remove
my $result = $playlist->remove;
Remove the playlist.
load
my $result = $playlist->load;
Load a playlist as the current active playlist.
radd
my $result = $playlist->radd($url);
Adds a $url
recursivly to the playlist. The $url
should be absolute to the server-side.
radd_encoded
my $result = $playlist->radd_encoded($url);
Same as "radd", except it expects $url
to be encoded already.
AUTHOR
Florian Ragwitz <rafl@debian.org>
SEE ALSO
Audio::XMMSClient, Audio::XMMSClient::Result
COPYRIGHT AND LICENSE
Copyright (C) 2006-2007, Florian Ragwitz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.