diff --git a/pkg/builder/youtube.go b/pkg/builder/youtube.go index fcd3adaa..6b7a9dec 100644 --- a/pkg/builder/youtube.go +++ b/pkg/builder/youtube.go @@ -317,7 +317,7 @@ func (yt *YouTubeBuilder) queryVideoDescriptions(ctx context.Context, playlist m // Sometimes YouTube retrun empty content defailt, use arbitrary one var seconds int64 = 1 - if video.ContentDetails != nil { + if video.ContentDetails.Duration != "" { // Parse duration d, err := duration.FromString(video.ContentDetails.Duration) if err != nil { @@ -325,6 +325,8 @@ func (yt *YouTubeBuilder) queryVideoDescriptions(ctx context.Context, playlist m } seconds = int64(d.ToDuration().Seconds()) + } else { + continue } var (