summaryrefslogtreecommitdiff
path: root/cgi-bin/playlists/extpls.pm
diff options
context:
space:
mode:
Diffstat (limited to 'cgi-bin/playlists/extpls.pm')
-rw-r--r--cgi-bin/playlists/extpls.pm39
1 files changed, 39 insertions, 0 deletions
diff --git a/cgi-bin/playlists/extpls.pm b/cgi-bin/playlists/extpls.pm
new file mode 100644
index 0000000..9cc048c
--- /dev/null
+++ b/cgi-bin/playlists/extpls.pm
@@ -0,0 +1,39 @@
+package extpls;
+
+use strict;
+use Globals;
+use Globals qw(%PLATTERS);
+use Globals qw($delim);
+
+sub new {
+ my $self = {
+ mime => "audio/scpls",
+ playlist => "[playlist]\n",
+ count => 0};
+ bless ($self);
+ return $self;
+}
+
+sub desc {
+ return "Very common audio playlist format";
+}
+
+sub header {
+}
+
+sub track {
+ my $self = shift;
+ my ($folder, $trackartist, $album, $year, $track, $url, $platter) = @_;
+ my $artist = getArtistString($folder, $trackartist);
+ $self->{count}++;
+ $self->{playlist} .= "File".$self->{count}."=".makeTrackURL( $PLATTERS{$platter}, $url, $folder, $trackartist, $track )."\n".
+ "Title".$self->{count}."=".makeNice($track)."\n".
+ "Length".$self->{count}."=-1\n";
+ }
+
+sub dump {
+ my $self = shift;
+ return $self->{playlist}."NumberOfEntries=".$self->{count}."\nVersion=2\n";
+ }
+
+return 1;