X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gal2%2Fgal-gen;h=1e7c3dd6d1562038f93ebf8ddbafdb5102b60b76;hb=a6d0d32eec237d41a55b9e54b88969d156c3458f;hp=7d244fe65edad26a85e6d9d86c8c87092f1bd067;hpb=11e566792f70153b513d4916f0540addcb0147ae;p=gallery.git diff --git a/gal2/gal-gen b/gal2/gal-gen index 7d244fe..1e7c3dd 100755 --- a/gal2/gal-gen +++ b/gal2/gal-gen @@ -5,7 +5,8 @@ use strict; use warnings; -use lib '/home/mj/web/gal2'; +use FindBin; +use lib $FindBin::Bin; use UCW::Gallery qw(%CF); use Image::Magick; @@ -41,7 +42,6 @@ for my $f (@$orig_list) { my $id = $f->{id}; my $rotate = $f->{orientation}; my $xfrm = $f->{xfrm}; - push @{$meta->{sequence}}, $id; print "$id: "; my $p = new Image::Magick; @@ -69,7 +69,10 @@ for my $f (@$orig_list) { 'xf' => $xfrm, 'w' => $w, 'h' => $h, + 'title' => $f->{title}, }; + $meta->{photo}->{$id} = $m; + push @{$meta->{sequence}}, $id; my $om = $old_meta->{photo}->{$id}; if ($om && @@ -79,7 +82,6 @@ for my $f (@$orig_list) { $om->{h} eq $m->{h}) { # FIXME: Remove old images? print "... uptodate\n"; - $meta->{photo}->{$id} = $om; next; } @@ -121,7 +123,6 @@ for my $f (@$orig_list) { rename $tmp, $photo or die "Cannot rename $tmp to $photo: $!\n"; print "... OK\n"; - $meta->{photo}->{$id} = $m; } print "Writing meta-data\n";