1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

feat: support for custom youtube embed URL

This commit is contained in:
Igor Rzegocki 2023-07-05 17:11:56 +02:00 committed by Frédéric Guillot
parent f286c3c1c9
commit 9b42d0e25e
8 changed files with 109 additions and 11 deletions

View file

@ -441,7 +441,7 @@ func inList(needle string, haystack []string) bool {
func rewriteIframeURL(link string) string {
matches := youtubeEmbedRegex.FindStringSubmatch(link)
if len(matches) == 2 {
return `https://www.youtube-nocookie.com/embed/` + matches[1]
return config.Opts.YouTubeEmbedUrlOverride() + matches[1]
}
return link