|
|
|
@ -5,7 +5,7 @@ use warnings;
|
|
|
|
|
|
|
|
|
|
use base 'Text::Playlist'; |
|
|
|
|
|
|
|
|
|
our $VERSION = 0.1; |
|
|
|
|
our $VERSION = 'v0.1.0'; |
|
|
|
|
|
|
|
|
|
sub new { |
|
|
|
|
my ($class) = @_; |
|
|
|
@ -107,8 +107,23 @@ __END__
|
|
|
|
|
|
|
|
|
|
Text::Playlist::M3U - parser for 'm3u' format |
|
|
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
|
|
|
|
|
|
|
|
my $m3u = Text::Playlist::M3U->new; |
|
|
|
|
my @items = $m3u->load('/path/to/playlist.m3u'); |
|
|
|
|
|
|
|
|
|
foreach my $item (@items) { |
|
|
|
|
# <work with playlist items> |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$m3u->save('/path/to/new-playlist.m3u', @items); |
|
|
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
|
|
|
|
|
|
|
|
Lightweight parser and generator for m3u playlists. |
|
|
|
|
Will be usefull if you're just want to read playlist, or convert playlist |
|
|
|
|
to another format, or change playlist items by some way. |
|
|
|
|
|
|
|
|
|
=head2 C<load> |
|
|
|
|
=head2 C<parse> |
|
|
|
|
=head2 C<save> |
|
|
|
@ -125,8 +140,12 @@ Each parsed item has the following keys in hashref:
|
|
|
|
|
* duration -- item duration in seconds, or -1 if not unknown |
|
|
|
|
* attrs -- hashref with attributes for given item, optional |
|
|
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
|
|
|
|
|
|
|
|
* L<MP3::M3U::Parser> -- full-featured parser |
|
|
|
|
|
|
|
|
|
=head1 AUTHORS |
|
|
|
|
|
|
|
|
|
Alex 'AdUser' Z <ad_user@runbox.com> |
|
|
|
|
Alex 'AdUser' Z <aduser@cpan.org> |
|
|
|
|
|
|
|
|
|
=cut |
|
|
|
|