fix: use channel_id feed URL instead of broken playlist_id prefix
YouTube's UULF and UU playlist prefixes for filtering Shorts are no longer working (returning 404/500 errors). Fall back to the standard channel_id= feed URL which works reliably. Shorts may appear in the feed but the widget will no longer error out.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,3 +3,4 @@
|
||||
/playground
|
||||
/.idea
|
||||
/glance*.yml
|
||||
glance-bin
|
||||
|
||||
@@ -146,9 +146,6 @@ func fetchYoutubeChannelUploads(channelOrPlaylistIDs []string, videoUrlTemplate
|
||||
if strings.HasPrefix(channelOrPlaylistIDs[i], videosWidgetPlaylistPrefix) {
|
||||
feedUrl = "https://www.youtube.com/feeds/videos.xml?playlist_id=" +
|
||||
strings.TrimPrefix(channelOrPlaylistIDs[i], videosWidgetPlaylistPrefix)
|
||||
} else if !includeShorts && strings.HasPrefix(channelOrPlaylistIDs[i], "UC") {
|
||||
playlistId := strings.Replace(channelOrPlaylistIDs[i], "UC", "UULF", 1)
|
||||
feedUrl = "https://www.youtube.com/feeds/videos.xml?playlist_id=" + playlistId
|
||||
} else {
|
||||
feedUrl = "https://www.youtube.com/feeds/videos.xml?channel_id=" + channelOrPlaylistIDs[i]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user