From f8b3236ae166293daffc177dd7620dec50283e88 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Tue, 28 Jul 2015 13:16:28 +0100 Subject: [PATCH] Fixing build issues --- service_youtube.go | 4 ++-- songqueue.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service_youtube.go b/service_youtube.go index 2724b19..2a08c0d 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -110,7 +110,7 @@ type YouTubeSong struct { // NewYouTubeSong gathers the metadata for a song extracted from a YouTube video, and returns // the song. -func NewYouTubeSong(user, id, offset string, playlist *YouTubePlaylist) (*YouTubeSong, error) { +func NewYouTubeSong(user, id, offset string, list *YouTubePlaylist) (*YouTubeSong, error) { var apiResponse *jsonq.JsonQuery var err error url := fmt.Sprintf("https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails&id=%s&key=%s", @@ -193,7 +193,7 @@ func NewYouTubeSong(user, id, offset string, playlist *YouTubePlaylist) (*YouTub duration: durationString, thumbnail: thumbnail, skippers: make([]string, 0), - playlist: playlist, + playlist: list, dontSkip: false, } dj.queue.AddSong(song) diff --git a/songqueue.go b/songqueue.go index 24755a6..5cf9e8d 100644 --- a/songqueue.go +++ b/songqueue.go @@ -43,7 +43,7 @@ func (q *SongQueue) CurrentSong() Song { // NextSong moves to the next Song in SongQueue. NextSong() removes the first Song in the queue. func (q *SongQueue) NextSong() { if s, err := q.PeekNext(); err == nil { - if q.CurrentSong().Playlist() != nil && s.Playlist() != nil { + if (q.CurrentSong().Playlist() != nil) && (s.Playlist() != nil) { if q.CurrentSong().Playlist().ID() != s.Playlist().ID() { q.CurrentSong().Playlist().DeleteSkippers() }