summaryrefslogtreecommitdiff
path: root/internal/feed/feed.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--internal/feed/feed.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/feed/feed.go b/internal/feed/feed.go
index ddc91ed..1a6ef97 100644
--- a/internal/feed/feed.go
+++ b/internal/feed/feed.go
@@ -23,11 +23,18 @@ type feedDescriptor struct {
Url string
}
+type feedImage struct {
+ image []byte
+ mime string
+}
+
type feeditem struct {
*gofeed.Feed
*gofeed.Item
+ Body string
updateOnly bool
reasons []string
+ images []feedImage
}
// Creator returns the name of the creating author.
@@ -45,6 +52,16 @@ func (item *feeditem) addReason(reason string) {
}
}
+func (item *feeditem) addImage(img []byte, mime string) int {
+ i := feedImage{img, mime}
+ item.images = append(item.images, i)
+ return len(item.images)
+}
+
+func (item *feeditem) clearImages() {
+ item.images = []feedImage{}
+}
+
func (feed *Feed) descriptor() feedDescriptor {
return feedDescriptor{
Name: feed.Name,