diff options
Diffstat (limited to 'reddit_background')
-rw-r--r-- | reddit_background/reddit_background.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/reddit_background/reddit_background.go b/reddit_background/reddit_background.go index 60ba4ec..4b3464e 100644 --- a/reddit_background/reddit_background.go +++ b/reddit_background/reddit_background.go @@ -35,6 +35,7 @@ type RedditImage struct { URL string `json:"url,omitempty"` Permalink string `json:"permalink"` Domain string `json:"domain"` + Stickied bool `json:"stickied,omitempty"` Saved bool `json:"-"` Data []byte `json:"-"` origdata []byte `json:"-"` @@ -84,6 +85,10 @@ func GetRedditImage(maxsize int, subreddit string) (*RedditImage, error) { continue } + if ri.Stickied { + continue + } + if ri.fetch(maxsize) { return ri, nil } |