version 1.8, 2011/06/14 16:53:27 |
version 1.9, 2011/06/14 17:22:13 |
|
|
#!/usr/bin/perl |
#!/usr/bin/perl |
# $RedRiver: playmp3s.pl,v 1.7 2010/10/28 19:21:29 andrew Exp $ |
# $AFresh1$ |
######################################################################## |
######################################################################## |
# PlayMP3.pl *** play's MP3s off a playlist using mp3play |
# PlayMP3.pl *** play's MP3s off a playlist using mp3play |
# |
# |
|
|
|
|
my @playlist; |
my @playlist; |
|
|
|
my $playing = ''; |
for ( ;; ) { |
for ( ;; ) { |
|
|
# while(1) { |
# while(1) { |
my $save_playlist; |
my $save_playlist; |
|
|
|
if ( $cfgs{pausedfile} && -e $cfgs{pausedfile} ) { |
|
Print_PlayLog("Paused\n"); |
|
DisplayPlaying( $cfgs{currenthtml}, "Paused" ) |
|
unless $playing eq 'paused'; |
|
$playing = 'paused'; |
|
sleep 10; |
|
next; |
|
} |
|
|
my ($last_mod) = ( stat( $cfgs{list} ) )[9]; |
my ($last_mod) = ( stat( $cfgs{list} ) )[9]; |
if ( $playlist_last_mod != $last_mod ) { |
if ( $playlist_last_mod != $last_mod ) { |
@playlist = (); |
@playlist = (); |
|
|
|
|
Print_PlayLog("displaying file that is playing . . . "); |
Print_PlayLog("displaying file that is playing . . . "); |
DisplayPlaying( $cfgs{currenthtml}, $filename ); |
DisplayPlaying( $cfgs{currenthtml}, $filename ); |
|
$playing = $filename; |
Print_PlayLog("done\n"); |
Print_PlayLog("done\n"); |
|
|
Print_PlayLog("Adding Last. . ."); |
Print_PlayLog("Adding Last. . ."); |
|
|
|
|
Print_PlayLog("Displaying Nothing . . ."); |
Print_PlayLog("Displaying Nothing . . ."); |
DisplayPlaying( $cfgs{currenthtml}, "Nothing" ); |
DisplayPlaying( $cfgs{currenthtml}, "Nothing" ); |
|
$playing = 'nothing'; |
Print_PlayLog("done\n"); |
Print_PlayLog("done\n"); |
|
|
#@playlist = (); |
#@playlist = (); |