From 23419ec767a34a4c61606b580bf92eb285842f8c Mon Sep 17 00:00:00 2001 From: Mattias Wadman Date: Tue, 29 Oct 2019 00:58:46 +0100 Subject: [PATCH] Add thumbnails array --- goutubedl.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/goutubedl.go b/goutubedl.go index ca378de..bca1bfc 100644 --- a/goutubedl.go +++ b/goutubedl.go @@ -109,7 +109,8 @@ type Info struct { Description string `json:"description"` Thumbnail string `json:"thumbnail"` // not unmarshalled, populated from image thumbnail file - ThumbnailBytes []byte `json:"-"` + ThumbnailBytes []byte `json:"-"` + Thumbnails []Thumbnail `json:"thumbnails"` Formats []Format `json:"formats"` Subtitles map[string][]Subtitle `json:"subtitles"` @@ -121,6 +122,15 @@ type Info struct { Format } +type Thumbnail struct { + ID string `json:"id"` + URL string `json:"url"` + Preference int `json:"preference"` + Width int `json:"width"` + Height int `json:"height"` + Resolution string `json:"resolution"` +} + // Format youtube-dl downloadable format type Format struct { Ext string `json:"ext"` // Video filename extension