/[gnump3d]/gnump3d/bin/gnump3d2
ViewVC logotype

Diff of /gnump3d/bin/gnump3d2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.40 by skx, Sat Nov 1 16:23:19 2003 UTC revision 1.41 by skx, Sun Nov 2 14:22:12 2003 UTC
# Line 719  while (1) Line 719  while (1)
719                  {                  {
720                      if ( $REFERRER =~ /^$ref/ )                      if ( $REFERRER =~ /^$ref/ )
721                      {                      {
722                          print "Referrer '$REFERRER' matches '$ref'\n";                          $DEBUG && print "Referrer '$REFERRER' matches '$ref'\n";
723                      }                      }
724                      else                      else
725                      {                      {
# Line 1586  sub streamAudioFile( $ $ ) Line 1586  sub streamAudioFile( $ $ )
1586      #      #
1587      if ( $down_enabled eq 0 )      if ( $down_enabled eq 0 )
1588      {      {
1589          print "Downsampling disabled for : $file\n";          $DEBUG && print "Downsampling disabled for : $file\n";
1590          &serveFile( $data, $file );          &serveFile( $data, $file );
1591          exit;          exit;
1592      }      }
# Line 1608  sub streamAudioFile( $ $ ) Line 1608  sub streamAudioFile( $ $ )
1608    
1609          if ( length( $default_quality ) )          if ( length( $default_quality ) )
1610          {          {
1611              print "Downsampling quality set to '$default_quality' per config\n";              $DEBUG && print "Downsampling quality set to '$default_quality' per config\n";
1612          }          }
1613          else          else
1614          {          {
1615              print "Downsample disabled, users quality level is unset, and no default quality.\n";              $DEBUG && print "Downsample disabled, users quality level is unset, and no default quality.\n";
1616          }          }
1617      }      }
1618    
# Line 1639  sub streamAudioFile( $ $ ) Line 1639  sub streamAudioFile( $ $ )
1639      my $cmd = &getConfig( $configKey, "" );      my $cmd = &getConfig( $configKey, "" );
1640      if ( not( length( $cmd ) ) )      if ( not( length( $cmd ) ) )
1641      {      {
1642          print "Downsample disabled we didnt find a command for filetype '$configKey'\n";          $DEBUG && print "Downsample disabled we didnt find a command for filetype '$configKey'\n";
1643          serveFile( $data, $file );          serveFile( $data, $file );
1644          exit;          exit;
1645      }      }
# Line 1658  sub streamAudioFile( $ $ ) Line 1658  sub streamAudioFile( $ $ )
1658      #      #
1659      $cmd =~ s/\$FILENAME/$safeFile/g;      $cmd =~ s/\$FILENAME/$safeFile/g;
1660    
1661      print "Downsampling - running: '$cmd' for '$file' at level '$quality'\n";      $DEBUG && print "Downsampling - running: '$cmd' for '$file' at level '$quality'\n";
1662    
1663      #      #
1664      #  Serve HTTP header for the downsampled file.      #  Serve HTTP header for the downsampled file.
# Line 1666  sub streamAudioFile( $ $ ) Line 1666  sub streamAudioFile( $ $ )
1666      my $mime = $mime_cache{ lc( &getSuffix( $file ) ) };      my $mime = $mime_cache{ lc( &getSuffix( $file ) ) };
1667      if ( ! defined ( $mime ) )      if ( ! defined ( $mime ) )
1668      {      {
1669          print "No mime type found for $file\n";          $DEBUG && print "No mime type found for $file\n";
1670          $mime = "text/html";          $mime = "text/html";
1671      }      }
1672    
# Line 1731  sub serveFile( $ $ ) Line 1731  sub serveFile( $ $ )
1731      # Seek if we're supposed to.      # Seek if we're supposed to.
1732      if ( length( $RANGE ) && ( $RANGE > 0 ) )      if ( length( $RANGE ) && ( $RANGE > 0 ) )
1733      {      {
1734        print "SKIPPING $RANGE bytes\n";        $DEBUG && print "SKIPPING $RANGE bytes\n";
1735        read(FILE, $buff, $RANGE);        read(FILE, $buff, $RANGE);
1736        $buff = "";        $buff = "";
1737      }      }
# Line 2092  sub serveDirectory( $ $ ) Line 2092  sub serveDirectory( $ $ )
2092                  }                  }
2093    
2094                  push @DISPLAY, $dir . "/" . $file;                  push @DISPLAY, $dir . "/" . $file;
2095                  print "Kept $file\n";                  $DEBUG && print "Kept $file\n";
2096              }              }
2097    
2098              $totalFiles = $#DISPLAY + 1;              $totalFiles = $#DISPLAY + 1;
# Line 2392  sub getSongDisplay( $ $ ) Line 2392  sub getSongDisplay( $ $ )
2392        my @ARRAY = ( );        my @ARRAY = ( );
2393        push @ARRAY, $file;        push @ARRAY, $file;
2394    
       print "$file ....\n";  
2395        my %TAGS     = $tagCache->formatMultipleSongTags( @ARRAY );        my %TAGS     = $tagCache->formatMultipleSongTags( @ARRAY );
       print $TAGS{$file} . "\n";  
2396        return( $TAGS{ $file } );        return( $TAGS{ $file } );
2397    }    }
2398    # NOT REACHED    # NOT REACHED
# Line 2431  sub getThemeFile( $ $ ) Line 2429  sub getThemeFile( $ $ )
2429    
2430      if ( not -e $themeFile )      if ( not -e $themeFile )
2431      {      {
2432          print "The '$file' doesn't exist for the theme '$theme'\n";          $DEBUG && print "The '$file' doesn't exist for the theme '$theme'\n";
2433          exit;          exit;
2434      }      }
2435    
# Line 2578  sub testDirectoryAccess( $ $) Line 2576  sub testDirectoryAccess( $ $)
2576    
2577      $directory = $ROOT . "/" . $directory;      $directory = $ROOT . "/" . $directory;
2578    
2579      print "Testing for directory: $directory\n";      $DEBUG && print "Testing for directory: $directory\n";
2580    
2581      if ( -e  $directory . "/.password" )      if ( -e  $directory . "/.password" )
2582      {      {
2583          #          #
2584          print "Password file found\n";          $DEBUG && print "Password file found\n";
2585          if ( not length( $AUTHORIZATION ) )          if ( not length( $AUTHORIZATION ) )
2586          {          {
2587              # Send auth required header.              # Send auth required header.
# Line 2643  sub testDirectoryAccess( $ $) Line 2641  sub testDirectoryAccess( $ $)
2641              #              #
2642              #  Record failed login attempts              #  Record failed login attempts
2643              #              #
2644              print "Error : invalid login for user : $user\n";              $DEBUG && print "Error : invalid login for user : $user\n";
2645    
2646              #              #
2647              # No match found              # No match found
# Line 2660  sub testDirectoryAccess( $ $) Line 2658  sub testDirectoryAccess( $ $)
2658      }      }
2659      else      else
2660      {      {
2661          print "No password file found.\n";          $DEBUG && print "No password file found.\n";
2662      }      }
2663    
2664      # Redundent      # Redundent
# Line 2696  sub callPlugin( $ ) Line 2694  sub callPlugin( $ )
2694    
2695      if ( -e $plugin )      if ( -e $plugin )
2696      {      {
2697          print "Plugin '$plugin' exists.  Reading it.\n";          $DEBUG && print "Plugin '$plugin' exists.  Reading it.\n";
2698    
2699          open( PLUGIN, "<$plugin" ) or warn "can't read: $!";          open( PLUGIN, "<$plugin" ) or warn "can't read: $!";
2700          my @PLUGIN = <PLUGIN>;          my @PLUGIN = <PLUGIN>;
# Line 2723  sub callPlugin( $ ) Line 2721  sub callPlugin( $ )
2721          eval( $text );          eval( $text );
2722          if ( $@ )          if ( $@ )
2723          {          {
2724              print "Plugin load error $plugin : $@ ";              $DEBUG && print "Plugin load error $plugin : $@ ";
2725          }          }
2726    
2727          #          #
# Line 2740  sub callPlugin( $ ) Line 2738  sub callPlugin( $ )
2738      }      }
2739      else      else
2740      {      {
2741          print "Plugin '$plugin' not found\n";          $DEBUG && print "Plugin '$plugin' not found\n";
2742      }      }
2743  }  }
2744    
# Line 2779  sub dumpPlugin( $ ) Line 2777  sub dumpPlugin( $ )
2777          eval( $text );          eval( $text );
2778          if ( $@ )          if ( $@ )
2779          {          {
2780              print "Plugin load error $plugin : $@ ";              $DEBUG && print "Plugin load error $plugin : $@ ";
2781          }          }
2782    
2783          #          #
# Line 2801  sub dumpPlugin( $ ) Line 2799  sub dumpPlugin( $ )
2799      }      }
2800      else      else
2801      {      {
2802          print "Plugin '$plugin' not found\n";          $DEBUG && print "Plugin '$plugin' not found\n";
2803      }      }
2804  }  }
2805    

Legend:
Removed from v.1.40  
changed lines
  Added in v.1.41

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26