~gjabell/go-yt

25b3feb6e04ac109f5cbcedf75c8bd6b1d60297b — Galen Abell 6 months ago 03736e8 master 0.1.0
Rename watchURL to videoURL
1 files changed, 4 insertions(+), 4 deletions(-)

M yt.go
M yt.go => yt.go +4 -4
@@ 19,7 19,7 @@ type SearchResult struct {
	Title       string
	Thumbnails  []Thumbnail
	ViewCount   string
	WatchURL    string
	VideoURL    string
}

// Channel contains a video's channel metadata.


@@ 207,11 207,11 @@ func convertYoutubeData(renderer videoRenderer) *SearchResult {
		title = renderer.Title.Runs[0].Text
	}

	watchURL, err := makeURL(watchURL, map[string]string{
	videoURL, err := makeURL(watchURL, map[string]string{
		"v": renderer.VideoID,
	})
	if err != nil {
		watchURL = ""
		videoURL = ""
	}

	return &SearchResult{


@@ 222,6 222,6 @@ func convertYoutubeData(renderer videoRenderer) *SearchResult {
		Title:       title,
		Thumbnails:  renderer.Thumbnail.Thumbnails,
		ViewCount:   renderer.ViewCountText.SimpleText,
		WatchURL:    watchURL,
		VideoURL:    videoURL,
	}
}