Skip to content

Commit

Permalink
Expose channelid from videodetails
Browse files Browse the repository at this point in the history
  • Loading branch information
Satont authored and corny committed Nov 20, 2022
1 parent 60666b3 commit 2c5fdb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions video.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ type Video struct {
Title string
Description string
Author string
ChannelID string
Views int
Duration time.Duration
PublishDate time.Time
Expand Down Expand Up @@ -96,6 +97,7 @@ func (v *Video) extractDataFromPlayerResponse(prData playerResponseData) error {
v.Description = prData.VideoDetails.ShortDescription
v.Author = prData.VideoDetails.Author
v.Thumbnails = prData.VideoDetails.Thumbnail.Thumbnails
v.ChannelID = prData.VideoDetails.ChannelID

if views, _ := strconv.Atoi(prData.VideoDetails.ViewCount); views > 0 {
v.Views = views
Expand Down

0 comments on commit 2c5fdb9

Please sign in to comment.