1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

Check channel Kind

This commit is contained in:
Maksym Pavlenko
2017-11-08 12:31:44 -08:00
parent 29931902dd
commit 05de9038ea

View File

@ -145,7 +145,7 @@ func (yt *YouTubeBuilder) queryFeed(feed *model.Feed) (*itunes.Podcast, string,
itemId := channel.ContentDetails.RelatedPlaylists.Uploads itemId := channel.ContentDetails.RelatedPlaylists.Uploads
link := "" link := ""
if feed.LinkType == api.LinkTypeChannel { if channel.Kind == "youtube#channel" {
link = fmt.Sprintf("https://youtube.com/channel/%s", channel.Id) link = fmt.Sprintf("https://youtube.com/channel/%s", channel.Id)
} else { } else {
link = fmt.Sprintf("https://youtube.com/user/%s", channel.Snippet.CustomUrl) link = fmt.Sprintf("https://youtube.com/user/%s", channel.Snippet.CustomUrl)