From 31ad35449b6d4822eabc16e6058c0ebd132bca44 Mon Sep 17 00:00:00 2001 From: roelderickx Date: Sat, 6 Sep 2025 16:56:32 +0200 Subject: [PATCH] Delete only the posts which will be downloaded --- taparip.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/taparip.pl b/taparip.pl index 6b401c6..a4ea83a 100644 --- a/taparip.pl +++ b/taparip.pl @@ -183,7 +183,8 @@ sub download_thread { my $schema = "$root_url :: $topic :: $start"; my $dom = cache_get($schema); - $dbh->do('DELETE from posts where topic = ?', undef, $topic); + $dbh->do('DELETE from posts where topic = ? and seq between ? and + ?', undef, $topic, $start, $start + $posts_per_page - 1); if ($dbh->err) { die "Unable to delete $topic: $dbh-err : $dbh->errstr \n"; } if(! $dom) {