=================================================================== RCS file: /cvs/mp3/daemon/playmp3s.pl,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- mp3/daemon/playmp3s.pl 2011/06/14 16:53:27 1.8 +++ mp3/daemon/playmp3s.pl 2011/06/14 17:22:13 1.9 @@ -1,5 +1,5 @@ #!/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 # @@ -29,11 +29,21 @@ my @playlist; +my $playing = ''; for ( ;; ) { # while(1) { 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]; if ( $playlist_last_mod != $last_mod ) { @playlist = (); @@ -68,6 +78,7 @@ Print_PlayLog("displaying file that is playing . . . "); DisplayPlaying( $cfgs{currenthtml}, $filename ); + $playing = $filename; Print_PlayLog("done\n"); Print_PlayLog("Adding Last. . ."); @@ -113,6 +124,7 @@ Print_PlayLog("Displaying Nothing . . ."); DisplayPlaying( $cfgs{currenthtml}, "Nothing" ); + $playing = 'nothing'; Print_PlayLog("done\n"); #@playlist = ();