1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-06 17:41:00 +00:00

Make Invidious instance configurable

This commit is contained in:
Romain de Laage 2022-01-06 05:43:03 +01:00 committed by GitHub
parent 5879404fd2
commit 8329e9b46c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 26 additions and 4 deletions

View file

@ -11,6 +11,8 @@ import (
"regexp"
"strings"
"miniflux.app/config"
"github.com/PuerkitoBio/goquery"
)
@ -214,7 +216,7 @@ func addYoutubeVideoUsingInvidiousPlayer(entryURL, entryContent string) string {
matches := youtubeRegex.FindStringSubmatch(entryURL)
if len(matches) == 2 {
video := `<iframe width="650" height="350" frameborder="0" src="https://invidio.us/embed/` + matches[1] + `" allowfullscreen></iframe>`
video := `<iframe width="650" height="350" frameborder="0" src="https://` + config.Opts.InvidiousInstance() + `/embed/` + matches[1] + `" allowfullscreen></iframe>`
return video + `<br>` + entryContent
}
return entryContent