Revert the default for the processing/scaling, except for events that contain
authorSteinar H. Gunderson <sesse@debian.org>
Tue, 26 Dec 2006 15:58:14 +0000 (16:58 +0100)
committerSteinar H. Gunderson <sesse@debian.org>
Tue, 26 Dec 2006 15:58:14 +0000 (16:58 +0100)
NEF files; it's really annoying in the long run, and breaks with a long-standing
pr0n principle.

perl/Sesse/pr0n/Index.pm

index 6e1d237ce4640a4fbac9e5c794d5cb0cc1940b03..e85ab6e7ae0e281627da373a820994f630ddee18 100644 (file)
@@ -34,8 +34,8 @@ sub handler {
        my %defsettings = (
                thumbxres => 80,
                thumbyres => 64,
-               xres => undef,
-               yres => undef,
+               xres => -1,
+               yres => -1,
                start => 1,
                num => -1,
                all => 1,
@@ -45,6 +45,11 @@ sub handler {
                fullscreen => 0,
        );
        
+       # Any NEF files => default to processing
+       my $ref = $dbh->selectrow_hashref('SELECT * FROM images WHERE event=? AND LOWER(filename) LIKE \'%.nef\' LIMIT 1',
+               undef, $event)
+               and $defsettings{'xres'} = $defsettings{'yres'} = undef;
+       
        # Reduce the front page load when in overload mode.
        if (Sesse::pr0n::Overload::is_in_overload($r)) {
                $defsettings{'num'} = 100;