Add thumbnails array

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

View File

@ -109,7 +109,8 @@ type Info struct {
Description string `json:"description"` Description string `json:"description"`
Thumbnail string `json:"thumbnail"` Thumbnail string `json:"thumbnail"`
// not unmarshalled, populated from image thumbnail file // not unmarshalled, populated from image thumbnail file
ThumbnailBytes []byte `json:"-"` ThumbnailBytes []byte `json:"-"`
Thumbnails []Thumbnail `json:"thumbnails"`
Formats []Format `json:"formats"` Formats []Format `json:"formats"`
Subtitles map[string][]Subtitle `json:"subtitles"` Subtitles map[string][]Subtitle `json:"subtitles"`
@ -121,6 +122,15 @@ type Info struct {
Format 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 // Format youtube-dl downloadable format
type Format struct { type Format struct {
Ext string `json:"ext"` // Video filename extension Ext string `json:"ext"` // Video filename extension