Add thumbnails array

This commit is contained in:
Mattias Wadman
2019-10-29 00:58:46 +01:00
parent 181d7b2a30
commit 23419ec767

View File

@ -110,6 +110,7 @@ type Info struct {
Thumbnail string `json:"thumbnail"`
// not unmarshalled, populated from image thumbnail file
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