Renamed YoutubeSong to AudioTrack

And renamed YoutubePlaylist to AudioPlaylist
This commit is contained in:
MichaelOultram 2015-09-27 14:31:01 +01:00
parent 36b5f8f818
commit f5de1ae5ca
3 changed files with 8 additions and 8 deletions

View file

@ -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,

View file

@ -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,
}

View file

@ -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
}