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

Add support for Invidious

- Embed Invidious player for invidio.us feeds
- Add new rewrite rule to use Invidious player for Youtube feeds
This commit is contained in:
Frédéric Guillot 2020-03-20 20:45:37 -07:00
parent e494d6e381
commit 592151bdb6
4 changed files with 27 additions and 1 deletions

View file

@ -33,6 +33,10 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
entryContent = addDynamicImage(entryURL, entryContent)
case "add_youtube_video":
entryContent = addYoutubeVideo(entryURL, entryContent)
case "add_invidious_video":
entryContent = addInvidiousVideo(entryURL, entryContent)
case "add_youtube_video_using_invidious_player":
entryContent = addYoutubeVideoUsingInvidiousPlayer(entryURL, entryContent)
case "add_pdf_download_link":
entryContent = addPDFLink(entryURL, entryContent)
case "nl2br":
@ -47,7 +51,6 @@ func Rewriter(entryURL, entryContent, customRewriteRules string) string {
func getPredefinedRewriteRules(entryURL string) string {
urlDomain := url.Domain(entryURL)
for domain, rules := range predefinedRules {
if strings.Contains(urlDomain, domain) {
return rules