feat(poller): skip finished series, keep polling archived ones

This commit is contained in:
2026-07-27 12:49:52 +07:00
parent 051c429b24
commit d320016ceb
2 changed files with 39 additions and 0 deletions
+5
View File
@@ -327,10 +327,15 @@ func (s *Store) Delete(key string) error {
//
// Bookmarks with no series_url are skipped — there is nothing to fetch, which
// is the same filter the userscript applies at L452.
//
// Finished series are excluded: nothing more is coming, so fetching them only
// burns requests. Archived ones are deliberately still polled — knowing what a
// shelved series is up to is the whole reason for archiving instead of deleting.
func (s *Store) DueForLatestCheck(cutoffMs int64, limit int) ([]Bookmark, error) {
rows, err := s.db.Query(`SELECT `+bookmarkColumns+`
FROM bookmarks
WHERE series_url IS NOT NULL AND series_url <> ''
AND status IS NOT 'finished'
AND latest_checked_at <= ?
ORDER BY latest_checked_at ASC
LIMIT ?`, cutoffMs, limit)