After an update PT is now generating URLs in the format
domain.com/w/XXX
for videos vs the old format
domain.com/videos/watch/XXX
Which no longer passes the URL regex.
I have solved it temporarily with the following change in src/Plugin/video_embed_field/Provider/Peertube.php
54 preg_match('/^https?:\/\/(www\.)?' . $domain . '\/videos\/(watch|embed)\/(?<id>[0-9A-Za-z_-]*)/', $input, $matches);
55 if(empty($matches)) {
56 preg_match('/^https?:\/\/(www\.)?' . $domain . '\/w\/(?<id>[0-9A-Za-z_-]*)/', $input, $matches);
57 }
Comments
Comment #2
phjouCan you decide to keep the old path in Peertube ?
If you can't, I guess I can create a new branch with your change for the newest versions of Peertube.
If you can, I guess we should make the pattern configurable in order to support the different ways Peertube is working.
Comment #3
ryanwwbtc commentedThis is my first time using Peertube so I am not positive whether this can be configured. I have been through the admin GUI and haven't seen anything. The change came unexpectedly for us after an update.
This code will catch both old and new formats and both still work with Peertube, it just generates the new shorter ones by default. Configurable paths would definitely be nice in case they decide to change it again.
Comment #4
francoisa commentedCurrently, the new urls are no longer supported. And the plugin does not allow to integrate videos. I think you should keep the old URLs as well because some Peertube servers are not yet up to date.
The new Peertube servers from 3.3 version use the format :
https://videos.cemea.org/w/qtpcfhRLkMtyS64biUgQHr
and the servers < 3.2 use the format :
https://libre.video/videos/watch/643e1a66-385c-4b78-bcc0-9fb8380184bc.
So I think you should keep both.
Thank you.
Comment #5
mably commentedShould be fixed in new 3.0.0 release.
Comment #6
mably commented