<<

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

Arguments: none
Return Value: $result
  my $result = $playlist->list_entries;

List playlists content.

create

Arguments: none
Return Value: $result
  my $result = $playlist->create;

Creates a new empty playlist.

current_pos

Arguments: none
Return Value: $result
  my $result = $playlist->current_pos;

Retrives the current position in the playlist.

shuffle

Arguments; none
Return Value: $result
  my $result = $playlist->shuffle;

Shuffles the playlist.

sort

Arguments: \@properties
Return Value: $result
  my $result = $playlist->sort([qw/artist album tracknr/]);

Sorts the playlist according to the list of \@properties.

clear

Arguments: none
Return Value: $result
  my $result = $playlist->clear;

Clears the playlist.

insert_id

Arguments: $position, $id
Return Value: $result
  my $result = $playlist->insert_id(2, 1337);

Insert a medialib $id at given $position.

insert_args

Arguments: $position, $url, @args?
Return Value: $result
  my $result = $playlist->insert_args(1, 'file://path/to/media/file.sid', 'subtune=2');

Insert a $url at $position with @args.

insert_url

Arguments: $position, $url
Return Value: $result
  my $result = $playlist->insert_url(0, 'file://path/to/media/file.flac');

Insert $url at $position.

insert_encoded

Arguments: $position, $url
Return Value: $result
  my $result = $playlist->insert_encoded(5, $url);

Like "insert_url", except it expects $url to be encoded already.

insert_collection

Arguments: $position, $collection, \@order
Return Value: $result
  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

Arguments: $id
Return Value: $result
  my $result = $playlist->add_id(9667);

Add a medialib $id to the end of the playlist.

add_args

Arguments: $url, @args?
Return Value: $result
  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

Arguments: $url
Return Value: $result
  my $result = $playlist->add_url('file:///path/to/media/file.flac');

Add a $url to the end of the playlist.

add_encoded

Arguments: $url
Return Value: $result
  my $result = $playlist->add_encoded($url);

Like "add_url", except it expects $url to be encoded already.

add_collection

Arguments: $collection, \@order
  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

Arguments: $current_position, $new_position
Return Value: $result
  my $result = $playlist->move_entry(3, 0);

Moves a playlist entry from $current_position to $new_position.

remove_entry

Arguments: $position
Return Value: $result
  my $result = $playlist->remove_entry(6);

Removes the playlist entry at $position.

remove

Arguments: none
Return Value: $result
  my $result = $playlist->remove;

Remove the playlist.

load

Arguments: none
Return Value: $result
  my $result = $playlist->load;

Load a playlist as the current active playlist.

radd

Arguments: $url
Return Value: $result
  my $result = $playlist->radd($url);

Adds a $url recursivly to the playlist. The $url should be absolute to the server-side.

radd_encoded

Arguments: $url
Return Value: $result
  my $result = $playlist->radd_encoded($url);

Same as "radd", except it expects $url to be encoded already.

rinsert

Arguments: $position, $url
Return Value: $result
  my $result = $playlist->rinsert(42, $url);

Inserts a $url recursivly at a given position in the playlist. The $url should be absolute to the server-side.

rinsert_encoded

Arguments: $position, $url
Return Value: $result
  my $result = $playlist->rinsert_encoded(5, $url);

Same as "rinsert", 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-2008, 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.

<<