mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 16:59:12 +00:00
fix(feeds): feed cache key (#1230)
* fix(feeds): feed cache sometimes missing key * fix(feeds): feed cache use link as key if no guid
This commit is contained in:
parent
b6e7c45030
commit
7c91d34cb4
1 changed files with 3 additions and 3 deletions
|
@ -251,9 +251,9 @@ func (j *RSSJob) getFeed(ctx context.Context) (items []*gofeed.Item, err error)
|
||||||
|
|
||||||
key := item.GUID
|
key := item.GUID
|
||||||
if len(key) == 0 {
|
if len(key) == 0 {
|
||||||
key = item.Title
|
key = item.Link
|
||||||
if len(key) == 0 {
|
if len(key) == 0 {
|
||||||
continue
|
key = item.Title
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ func (j *RSSJob) getFeed(ctx context.Context) (items []*gofeed.Item, err error)
|
||||||
|
|
||||||
toCache = append(toCache, domain.FeedCacheItem{
|
toCache = append(toCache, domain.FeedCacheItem{
|
||||||
FeedId: strconv.Itoa(j.Feed.ID),
|
FeedId: strconv.Itoa(j.Feed.ID),
|
||||||
Key: i.GUID,
|
Key: key,
|
||||||
Value: []byte(i.Title),
|
Value: []byte(i.Title),
|
||||||
TTL: ttl,
|
TTL: ttl,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue