Browse Source

* cleanup

master
Alex 'AdUser' Z 9 years ago
parent
commit
2c9422ef4a
  1. 20
      lib/Text/Playlist/PLS.pm
  2. 19
      lib/Text/Playlist/XSPF.pm

20
lib/Text/Playlist/PLS.pm

@ -10,25 +10,7 @@ our $VERSION = 0.1;
sub new {
my ($class) = @_;
return bless({ items => [] }, $class);
}
sub add {
my ($self, %args) = @_;
foreach my $key (qw(file title)) {
next if $args{$key};
return "Missing '$key' parameter";
}
$self->{items} //= [];
push @{$self->{items}}, {
file => $args{file},
title => $args{title},
length => $args{length} || "-1",
};
return;
return bless({ }, $class);
}
sub parse {

19
lib/Text/Playlist/XSPF.pm

@ -14,24 +14,7 @@ our $VERSION = 0.1;
sub new {
my ($class) = @_;
return bless({ items => [], version => 0 }, $class);
}
sub add {
my ($self, %args) = @_;
foreach my $key (qw(title location)) {
next if $args{$key};
return "Missing '$key' parameter";
}
$self->{items} //= [];
push @{$self->{items}}, {
title => $args{title},
location => $args{location},
};
return;
return bless({ version => 0 }, $class);
}
sub parse {

Loading…
Cancel
Save