store podcast url

This commit is contained in:
Nazar Kanaev 2021-03-26 13:38:37 +00:00
parent 2e4082df77
commit 91deb41d5b

View File

@ -134,6 +134,10 @@ func ConvertItems(items []parser.Item, feed storage.Feed) []storage.Item {
result := make([]storage.Item, len(items))
for i, item := range items {
item := item
var podcastURL *string = nil
if item.AudioURL != "" {
podcastURL = &item.AudioURL
}
result[i] = storage.Item{
GUID: item.GUID,
FeedId: feed.Id,
@ -145,7 +149,7 @@ func ConvertItems(items []parser.Item, feed storage.Feed) []storage.Item {
Date: &item.Date,
Status: storage.UNREAD,
Image: item.ImageURL,
PodcastURL: nil,
PodcastURL: podcastURL,
}
}
return result