73 |
if ( $uri =~ /^\/random\/play/ ) |
if ( $uri =~ /^\/random\/play/ ) |
74 |
{ |
{ |
75 |
# |
# |
76 |
# We were - so use the submitted details to serve a |
# We were - so use the submitted details to serve a |
77 |
# playlist to the client. |
# playlist to the client. |
78 |
# |
# |
79 |
&handlePlaylist(); |
&handlePlaylist(); |
195 |
$file = $1; |
$file = $1; |
196 |
} |
} |
197 |
|
|
198 |
|
# Escape the link to the songs. |
199 |
|
$file = &urlEncode( $file ); |
200 |
|
|
201 |
$form .= "<input type='hidden' name='track$count' value='$file'>\n"; |
$form .= "<input type='hidden' name='track$count' value='$file'>\n"; |
202 |
$count ++; |
$count ++; |
203 |
} |
} |
288 |
|
|
289 |
foreach my $key ( keys %ARGUMENTS ) |
foreach my $key ( keys %ARGUMENTS ) |
290 |
{ |
{ |
|
|
|
291 |
if ( $key =~ /^track/ ) |
if ( $key =~ /^track/ ) |
292 |
{ |
{ |
293 |
push @songs, $ARGUMENTS{ $key }; |
push @songs, $ARGUMENTS{ $key }; |
312 |
{ |
{ |
313 |
$track = $1; |
$track = $1; |
314 |
} |
} |
315 |
if ( substr( $track, 0, 1 ) ne "/" ) |
if ( substr( $track, 0, 1 ) ne "/" ) |
316 |
{ |
{ |
317 |
$track = "/$track"; |
$track = "/$track"; |
318 |
} |
} |
328 |
my $header = &getHTTPHeader( 200, "text/html" ); |
my $header = &getHTTPHeader( 200, "text/html" ); |
329 |
&sendData( $data, $header ); |
&sendData( $data, $header ); |
330 |
my $text = &getErrorPage( $ARGUMENTS{'theme'}, |
my $text = &getErrorPage( $ARGUMENTS{'theme'}, |
331 |
"Error - No tracks sent" ); |
"Error - No tracks sent." ); |
332 |
&sendData( $data, $text ); |
&sendData( $data, $text ); |
333 |
close( $data ); |
close( $data ); |
334 |
exit; |
exit; |