From f5de1ae5ca146d867da112a4e810118a368b8fc2 Mon Sep 17 00:00:00 2001 From: MichaelOultram Date: Sun, 27 Sep 2015 14:31:01 +0100 Subject: [PATCH] Renamed YoutubeSong to AudioTrack And renamed YoutubePlaylist to AudioPlaylist --- service_soundcloud.go | 4 ++-- service_youtube.go | 4 ++-- youtube_dl.go | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/service_soundcloud.go b/service_soundcloud.go index d49498b..4fd85bb 100644 --- a/service_soundcloud.go +++ b/service_soundcloud.go @@ -61,7 +61,7 @@ func (sc SoundCloud) NewRequest(user *gumble.User, url string) ([]Song, error) { // Create playlist title, _ := apiResponse.String("title") permalink, _ := apiResponse.String("permalink_url") - playlist := &YouTubePlaylist{ + playlist := &AudioPlaylist{ id: permalink, title: title, } @@ -108,7 +108,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, offs thumbnail, _ = jsonq.NewQuery(userObj).String("avatar_url") } - song := &YouTubeSong{ + song := &AudioTrack{ id: strconv.Itoa(id), title: title, url: url, diff --git a/service_youtube.go b/service_youtube.go index 74da95f..7ecd02a 100644 --- a/service_youtube.go +++ b/service_youtube.go @@ -83,7 +83,7 @@ func (yt YouTube) NewSong(user *gumble.User, id, offset string, playlist Playlis thumbnail, _ := apiResponse.String("items", "0", "snippet", "thumbnails", "high", "url") duration, _ := apiResponse.String("items", "0", "contentDetails", "duration") - song := &YouTubeSong{ + song := &AudioTrack{ submitter: user, title: title, id: id, @@ -149,7 +149,7 @@ func (yt YouTube) NewPlaylist(user *gumble.User, id string) ([]Song, error) { } title, _ := apiResponse.String("items", "0", "snippet", "title") - playlist := &YouTubePlaylist{ + playlist := &AudioPlaylist{ id: id, title: title, } diff --git a/youtube_dl.go b/youtube_dl.go index 9217529..b1a6f18 100644 --- a/youtube_dl.go +++ b/youtube_dl.go @@ -24,8 +24,8 @@ import ( "github.com/layeh/gumble/gumble_ffmpeg" ) -// YouTubeSong implements the Song interface -type YouTubeSong struct { +// AudioTrack implements the Song interface +type AudioTrack struct { id string title string thumbnail string @@ -40,8 +40,8 @@ type YouTubeSong struct { service Service } -// YouTubePlaylist implements the Playlist interface -type YouTubePlaylist struct { +// AudioPlaylist implements the Playlist interface +type AudioPlaylist struct { id string title string }