368 |
$key = 'TITLE'; |
$key = 'TITLE'; |
369 |
} |
} |
370 |
|
|
371 |
|
# |
372 |
|
# Allow the song length in seconds to be used |
373 |
|
# this is used in the advanced playlists. |
374 |
|
# |
375 |
|
if ( $key eq "SECONDS" ) |
376 |
|
{ |
377 |
|
my $length = $TAGS{'LENGTH'} || ""; |
378 |
|
my $hours = 0; |
379 |
|
my $mins = 0; |
380 |
|
my $secs = 0; |
381 |
|
|
382 |
|
if ( $length =~ /^([0-9]+):([0-9]+):([0-9]+)$/ ) |
383 |
|
{ |
384 |
|
$hours = $1; |
385 |
|
$mins = $2; |
386 |
|
$secs = $3; |
387 |
|
} |
388 |
|
else |
389 |
|
{ |
390 |
|
if ( $length =~ /^([0-9]+):([0-9]+)$/ ) |
391 |
|
{ |
392 |
|
$hours= 0; |
393 |
|
$mins = $1; |
394 |
|
$secs = $2; |
395 |
|
} |
396 |
|
} |
397 |
|
|
398 |
|
$length = ( $secs * 60 ) + |
399 |
|
( $mins * 60 * 60 ) + |
400 |
|
( $hours * 60 * 60 * 60 ); |
401 |
|
|
402 |
|
$format = $pre . $length . $post; |
403 |
|
} |
404 |
|
|
405 |
if (defined( $TAGS{$key} ) ) |
if (defined( $TAGS{$key} ) ) |
406 |
{ |
{ |
407 |
# Do the insertion. |
# Do the insertion. |