Add thumbnails array
This commit is contained in:
12
goutubedl.go
12
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
|
||||
|
Reference in New Issue
Block a user