diff options
author | Daniel Friesel <derf@finalrewind.org> | 2011-03-03 21:24:01 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2011-03-03 21:24:01 +0100 |
commit | 866439d781c55a0fb1a0b3b7a92b7783a7a5dfc8 (patch) | |
tree | 2fd6caac8320a6899809607e61235ff798907635 /lib/App/Dthumb.pm | |
parent | 1dfc91688c268549575a2471ef610eedad3f75c5 (diff) |
Add -r/--recreate option
Diffstat (limited to 'lib/App/Dthumb.pm')
-rwxr-xr-x | lib/App/Dthumb.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/App/Dthumb.pm b/lib/App/Dthumb.pm index 941a70d..7f9bb23 100755 --- a/lib/App/Dthumb.pm +++ b/lib/App/Dthumb.pm @@ -114,9 +114,10 @@ sub new { my ($obj, %conf) = @_; my $ref = {}; + $conf{quality} //= 75; + $conf{recreate} //= 0; $conf{size} //= 200; $conf{spacing} //= 1.1; - $conf{quality} //= 75; $conf{title} //= (split(qr{/}, cwd()))[-1]; $conf{file_index} //= 'index.xhtml'; $conf{dir_thumbs} //= '.thumbs'; @@ -305,7 +306,7 @@ sub create_thumbnail_image { my $thumbdir = $self->{config}->{dir_thumbs}; my $thumb_dim = $self->{config}->{size}; - if (-e "${thumbdir}/${file}") { + if (-e "${thumbdir}/${file}" and not $self->{config}->{recreate}) { return; } |