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:
Tanmay Karande
2026-03-05 01:25:57 -05:00
parent 6c5b7a3f4c
commit c8b7322f13
2 changed files with 1 additions and 3 deletions

View File

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