NAME

App::Pimpd::Playlist - Functions dealing with the current playlist

SYNOPSIS

use App::Pimpd;
use App::Pimpd::Playlist;

add_playlist(@playlists);
play_pos_from_playlist(42);

queue(4, 12, 9, 18);

DESCRIPTION

App::Pimpd::Playlist provides functions playing with the current playlist

EXPORTS

add_playlist()
add_playlist('rock');

Parameters: @playlists

Tries hard to find valid, existing playlists based on input. If a playlist doesn't exist, tries to match the strings against the existing ones (using get_valid_lists() from App::Pimpd::Validate), presenting the user with a prompt.

get_valid_lists() returns a list of valid playlists which we add to the current playlist.

play_pos_from_playlist()
play_pos_from_playlist(42);

Parameters: $playlist_pos

Play $playlist_pos in the current playlist.

queue()
queue(42, 3, 9, 18, 12);

Parameters: @playlist_positions

Simulates a queue by turning random mode off and moving the supplied playlist position IDs up in order.

show_playlist()

Show the current playlist.

songs_in_playlist()

Parameters: @playlists

Takes a list of existing playlists and prints the content.

list_all_playlists()

In list context, returns a list with known playlists.

In scalar context, returns the number of knows playlists.

add_to_playlist()

Parameters: @paths | \@paths

Adds the list of songs (paths) to the current playlist.

remove_album_from_playlist()

Parameters: $regex

Tries to remove all albums matching $regex from the current playlist.

SEE ALSO

App::Pimpd

AUTHOR

Magnus Woldrich
CPAN ID: WOLDRICH
magnus@trapd00r.se
http://japh.se

COPYRIGHT

Copyright (C) 2010, 2011 Magnus Woldrich. All right reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.