Fix videos widget channel URL

This commit is contained in:
Svilen Markov 2024-09-01 02:27:09 +01:00
parent 3a9cff697b
commit f76e06ec57

View File

@ -11,9 +11,7 @@ import (
type youtubeFeedResponseXml struct {
Channel string `xml:"author>name"`
ChannelLink struct {
Href string `xml:"href,attr"`
} `xml:"link"`
ChannelLink string `xml:"author>uri"`
Videos []struct {
Title string `xml:"title"`
Published string `xml:"published"`
@ -97,7 +95,7 @@ func FetchYoutubeChannelUploads(channelIds []string, videoUrlTemplate string, in
Title: video.Title,
Url: videoUrl,
Author: response.Channel,
AuthorUrl: response.ChannelLink.Href + "/videos",
AuthorUrl: response.ChannelLink + "/videos",
TimePosted: parseYoutubeFeedTime(video.Published),
})
}