[YoutubeBridge] Fix issues loading playlists
Videos that are part of a playlist have the playlist ID encoded in the URI. When loading the video info the page contents change unex- pectedly due to the playlist being part of the page. This removes any trailing parameters from the video ID in order to ensure only pure videos are loaded at all times.
This commit is contained in:
parent
0e2b80d5d7
commit
9a9ce30b16
1 changed files with 1 additions and 0 deletions
|
@ -102,6 +102,7 @@ class YoutubeBridge extends BridgeAbstract {
|
|||
$desc = '';
|
||||
$time = 0;
|
||||
$vid = str_replace('/watch?v=', '', $element->find('a', 0)->href);
|
||||
$vid = substr($vid, 0, strpos($vid, '&') ?: strlen($vid));
|
||||
$title = $this->ytBridgeFixTitle($element->find($title_selector, 0)->plaintext);
|
||||
if($title != '[Private Video]') {
|
||||
$this->ytBridgeQueryVideoInfo($vid, $author, $desc, $time);
|
||||
|
|
Loading…
Reference in a new issue