Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: ca75f74154f4db559a84cb78acc76e8d343e616d
Timestamp: Mon, 03 Mar 2025 10:22:36 +0000 (1 month ago)

+5 -1 +/-1 browse
mark entries as read after translation
1diff --git a/source_miniflux.go b/source_miniflux.go
2index 741de26..e91fabd 100644
3--- a/source_miniflux.go
4+++ b/source_miniflux.go
5 @@ -54,10 +54,14 @@ func (m *MinifluxFeed) Get(ctx context.Context, i int) (*Article, error) {
6 return nil, err
7 }
8 }
9- entries, err := m.client.FeedEntries(m.feedId, &miniflux.Filter{Status: miniflux.EntryStatusUnread})
10+ entries, err := m.client.FeedEntries(m.feedId, &miniflux.Filter{
11+ Status: miniflux.EntryStatusUnread, Direction: "desc", Order: "published_at"})
12 if err != nil {
13 return nil, err
14 }
15 entry := entries.Entries[i]
16+ if err := m.client.UpdateEntries([]int64{entry.ID}, "read"); err != nil {
17+ return nil, err
18+ }
19 return &Article{raw: extractText(entry.Content)}, nil
20 }