From 9d93799d8680e79713990002ecc39b99e478c107 Mon Sep 17 00:00:00 2001 From: Niko Storni Date: Thu, 11 Aug 2022 05:28:06 +0200 Subject: [PATCH] account for nil struct --- downloader/ytdl/Video.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/downloader/ytdl/Video.go b/downloader/ytdl/Video.go index 70b2d32..bd275bc 100644 --- a/downloader/ytdl/Video.go +++ b/downloader/ytdl/Video.go @@ -107,7 +107,7 @@ func (v *YtdlVideo) GetUploadTime() time.Time { mortyRelease, err := sdk.GetAPIsConfigs().GetReleasedDate(v.ID) if err != nil { logrus.Error(err) - } else if mortyRelease.ReleaseTime != "" { + } else if mortyRelease != nil { mortyReleaseTimestamp, err = time.ParseInLocation(time.RFC3339, mortyRelease.ReleaseTime, time.UTC) if err != nil { logrus.Error(err)