summaryrefslogtreecommitdiff
path: root/lib/Multi
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-07-19 11:36:54 +0200
committerYorhel <git@yorhel.nl>2009-07-19 11:36:54 +0200
commit678a78d71534441d5471ed24aa8b471ba08c6664 (patch)
treeba79c25216a87b7f56d71f864ed641d8a91222e4 /lib/Multi
parent4df0638b6f615489bd946c03753b3bbe0269e3b2 (diff)
Converted and renamed screenshots.status (int) to processed (bool)
There were only two states, processed and unprocessed, so simply using a boolean column with correct naming is more clarifying.
Diffstat (limited to 'lib/Multi')
-rw-r--r--lib/Multi/Image.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Multi/Image.pm b/lib/Multi/Image.pm
index a0c27a51..a1e30f37 100644
--- a/lib/Multi/Image.pm
+++ b/lib/Multi/Image.pm
@@ -80,7 +80,7 @@ sub cv_process { # num, res
sub scr_check {
$_[KERNEL]->delay('scr_check');
- $_[KERNEL]->post(pg => query => 'SELECT id FROM screenshots WHERE status = 0 LIMIT 1', undef, 'scr_process');
+ $_[KERNEL]->post(pg => query => 'SELECT id FROM screenshots WHERE processed = false LIMIT 1', undef, 'scr_process');
}
@@ -106,12 +106,12 @@ sub scr_process { # num, res
$im->Write($st);
$_[KERNEL]->post(pg => do =>
- 'UPDATE screenshots SET status = 1, width = ?, height = ? WHERE id = ?',
+ 'UPDATE screenshots SET processed = true, width = ?, height = ? WHERE id = ?',
[ $$old[0], $$old[1], $id ]
);
$_[KERNEL]->call(core => log =>
'Processed screenshot #%d in %.2fs: %.1fkB -> %.1fkB (%dx%d), thumb: %.1fkB (%dx%d)',
- $_[ARG0], time-$start, $os/1024, (-s $sf)/1024, $$old[0], $$old[1], (-s $st)/1024, $$new[0], $$new[1]
+ $id, time-$start, $os/1024, (-s $sf)/1024, $$old[0], $$old[1], (-s $st)/1024, $$new[0], $$new[1]
);
$_[KERNEL]->yield('scr_check');