storage fixes

This commit is contained in:
Nazar Kanaev
2021-03-10 21:58:00 +00:00
parent f1332d4200
commit fa2b97242d
3 changed files with 52 additions and 31 deletions

View File

@@ -238,11 +238,11 @@ func convertItems(items []*gofeed.Item, feed storage.Feed) []storage.Item {
if item.Author != nil {
author = item.Author.Name
}
podcastUrl := ""
var podcastUrl *string
if item.Enclosures != nil {
for _, enclosure := range item.Enclosures {
if strings.ToLower(enclosure.Type) == "audio/mpeg" {
podcastUrl = enclosure.URL
podcastUrl = &enclosure.URL
}
}
}