mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2024-11-02 20:11:09 +00:00
invidious/invidious.php aktualisiert
Note taken from @MrPetovan
This commit is contained in:
parent
9627e95b19
commit
3bf547ee6e
1 changed files with 3 additions and 6 deletions
|
@ -93,12 +93,9 @@ function invidious_render(array &$b)
|
|||
$original = $b['html'];
|
||||
$server = DI::pConfig()->get(DI::userSession()->getLocalUserId(), 'invidious', 'server', DI::config()->get('invidious', 'server', INVIDIOUS_DEFAULT));
|
||||
|
||||
$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?:\/\/youtube.com\/watch\?v\=(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
||||
$b['html'] = preg_replace("/https?:\/\/youtube.com\/embed\/(.*?)/ism", $server . '/embed/$1', $b['html']);
|
||||
$b['html'] = preg_replace("/https?:\/\/youtube.com\/shorts\/(.*?)/ism", $server . '/shorts/$1', $b['html']);
|
||||
$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?:\/\/youtu.be\/(.*?)/ism", $server . '/watch?v=$1', $b['html']);
|
||||
|
||||
if ($original != $b['html']) {
|
||||
|
|
Loading…
Reference in a new issue