Renamed YoutubeSong to AudioTrack
And renamed YoutubePlaylist to AudioPlaylist
This commit is contained in:
parent
36b5f8f818
commit
f5de1ae5ca
|
@ -61,7 +61,7 @@ func (sc SoundCloud) NewRequest(user *gumble.User, url string) ([]Song, error) {
|
||||||
// Create playlist
|
// Create playlist
|
||||||
title, _ := apiResponse.String("title")
|
title, _ := apiResponse.String("title")
|
||||||
permalink, _ := apiResponse.String("permalink_url")
|
permalink, _ := apiResponse.String("permalink_url")
|
||||||
playlist := &YouTubePlaylist{
|
playlist := &AudioPlaylist{
|
||||||
id: permalink,
|
id: permalink,
|
||||||
title: title,
|
title: title,
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ func (sc SoundCloud) NewSong(user *gumble.User, trackData *jsonq.JsonQuery, offs
|
||||||
thumbnail, _ = jsonq.NewQuery(userObj).String("avatar_url")
|
thumbnail, _ = jsonq.NewQuery(userObj).String("avatar_url")
|
||||||
}
|
}
|
||||||
|
|
||||||
song := &YouTubeSong{
|
song := &AudioTrack{
|
||||||
id: strconv.Itoa(id),
|
id: strconv.Itoa(id),
|
||||||
title: title,
|
title: title,
|
||||||
url: url,
|
url: url,
|
||||||
|
|
|
@ -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")
|
thumbnail, _ := apiResponse.String("items", "0", "snippet", "thumbnails", "high", "url")
|
||||||
duration, _ := apiResponse.String("items", "0", "contentDetails", "duration")
|
duration, _ := apiResponse.String("items", "0", "contentDetails", "duration")
|
||||||
|
|
||||||
song := &YouTubeSong{
|
song := &AudioTrack{
|
||||||
submitter: user,
|
submitter: user,
|
||||||
title: title,
|
title: title,
|
||||||
id: id,
|
id: id,
|
||||||
|
@ -149,7 +149,7 @@ func (yt YouTube) NewPlaylist(user *gumble.User, id string) ([]Song, error) {
|
||||||
}
|
}
|
||||||
title, _ := apiResponse.String("items", "0", "snippet", "title")
|
title, _ := apiResponse.String("items", "0", "snippet", "title")
|
||||||
|
|
||||||
playlist := &YouTubePlaylist{
|
playlist := &AudioPlaylist{
|
||||||
id: id,
|
id: id,
|
||||||
title: title,
|
title: title,
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,8 +24,8 @@ import (
|
||||||
"github.com/layeh/gumble/gumble_ffmpeg"
|
"github.com/layeh/gumble/gumble_ffmpeg"
|
||||||
)
|
)
|
||||||
|
|
||||||
// YouTubeSong implements the Song interface
|
// AudioTrack implements the Song interface
|
||||||
type YouTubeSong struct {
|
type AudioTrack struct {
|
||||||
id string
|
id string
|
||||||
title string
|
title string
|
||||||
thumbnail string
|
thumbnail string
|
||||||
|
@ -40,8 +40,8 @@ type YouTubeSong struct {
|
||||||
service Service
|
service Service
|
||||||
}
|
}
|
||||||
|
|
||||||
// YouTubePlaylist implements the Playlist interface
|
// AudioPlaylist implements the Playlist interface
|
||||||
type YouTubePlaylist struct {
|
type AudioPlaylist struct {
|
||||||
id string
|
id string
|
||||||
title string
|
title string
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue