mirror of
https://github.com/nkanaev/yarr.git
synced 2025-05-25 05:29:20 +00:00
fallback to updated date
This commit is contained in:
parent
8ec1370845
commit
aebe2cc040
@ -71,7 +71,11 @@ func (s *Storage) CreateItems(items []Item) bool {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
|
|
||||||
for _, item := range items {
|
for _, item := range items {
|
||||||
|
if item.Date == nil {
|
||||||
|
item.Date = item.DateUpdated
|
||||||
|
}
|
||||||
_, err = tx.Exec(`
|
_, err = tx.Exec(`
|
||||||
insert into items (
|
insert into items (
|
||||||
guid, feed_id, title, link, description,
|
guid, feed_id, title, link, description,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user