From 528c71879d8ea312743e0397fef614c859be39b3 Mon Sep 17 00:00:00 2001 From: loma-one Date: Tue, 16 Apr 2024 18:11:23 +0200 Subject: [PATCH] invidious/invidious.php aktualisiert Now also considers links from "music.youtube" Raised to version 0.5 Removed the status "not supported. This must have crept in. It was not set by me and that was not my intention. Users explicitly request the option to set a different server in their personal settings. This function is very important to users. This request should not be ignored. --- invidious/invidious.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/invidious/invidious.php b/invidious/invidious.php index 7153aab9..b4884209 100644 --- a/invidious/invidious.php +++ b/invidious/invidious.php @@ -2,10 +2,10 @@ /* * Name: invidious * Description: Replaces links to youtube.com to an invidious instance in all displays of postings on a node. - * Version: 0.4 + * Version: 0.5 * Author: Matthias Ebers * Author: Michael Vogel - * Status: Unsupported + * Status: * Note: Please use the URL Replace addon instead */ @@ -96,6 +96,7 @@ function invidious_render(array &$b) $b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/watch\?v=(.*?)~ism", $server . '/watch?v=$1', $b['html']); $b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/embed/(.*?)~ism", $server . '/embed/$1', $b['html']); $b['html'] = preg_replace("~https?://(?:www\.)?youtube\.com/shorts/(.*?)~ism", $server . '/shorts/$1', $b['html']); + $b['html'] = preg_replace ("/https?:\/\/music.youtube.com\/(.*?)/ism", $server . '/watch?v=$1', $b['html']); $b['html'] = preg_replace("/https?:\/\/youtu.be\/(.*?)/ism", $server . '/watch?v=$1', $b['html']); if ($original != $b['html']) {