|
|
@ -84,6 +84,9 @@ func AddPodcastItems(podcast *db.Podcast) error {
|
|
|
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
|
|
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
|
|
|
duration, _ := strconv.Atoi(obj.Duration)
|
|
|
|
duration, _ := strconv.Atoi(obj.Duration)
|
|
|
|
pubDate, _ := time.Parse(time.RFC1123Z, obj.PubDate)
|
|
|
|
pubDate, _ := time.Parse(time.RFC1123Z, obj.PubDate)
|
|
|
|
|
|
|
|
if (pubDate == time.Time{}) {
|
|
|
|
|
|
|
|
pubDate, _ = time.Parse(time.RFC1123, obj.PubDate)
|
|
|
|
|
|
|
|
}
|
|
|
|
var downloadStatus db.DownloadStatus
|
|
|
|
var downloadStatus db.DownloadStatus
|
|
|
|
if i < limit {
|
|
|
|
if i < limit {
|
|
|
|
downloadStatus = db.NotDownloaded
|
|
|
|
downloadStatus = db.NotDownloaded
|
|
|
|