Fixing build issues

This commit is contained in:
MichaelOultram 2015-07-28 13:12:49 +01:00
parent b4867c629d
commit 09637395cc

View file

@ -42,14 +42,14 @@ func (q *SongQueue) CurrentSong() Song {
// NextSong moves to the next Song in SongQueue. NextSong() removes the first Song in the queue. // NextSong moves to the next Song in SongQueue. NextSong() removes the first Song in the queue.
func (q *SongQueue) NextSong() { func (q *SongQueue) NextSong() {
if q.CurrentSong().Playlist() != nil { if s, err := q.PeekNext(); err == nil {
if s, err := q.PeekNext(); err == nil { if q.CurrentSong().Playlist() != nil && s.Playlist() != nil {
if s.Playlist() != nil && (q.CurrentSong().Playlist().ID() != s.Playlist().ID()) { if q.CurrentSong().Playlist().ID() != s.Playlist().ID() {
q.CurrentSong().Playlist().DeleteSkippers() q.CurrentSong().Playlist().DeleteSkippers()
} }
} else {
q.CurrentSong().Playlist().DeleteSkippers()
} }
} else {
q.CurrentSong().Playlist().DeleteSkippers()
} }
q.queue = q.queue[1:] q.queue = q.queue[1:]
} }