Skip to content

Commit

Permalink
[RutubeBridge] Fix video fetching by channel id
Browse files Browse the repository at this point in the history
  • Loading branch information
em92 committed Oct 5, 2024
1 parent 73681e5 commit a1b6a15
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bridges/RutubeBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ private function getVideosFromReduxState()
$reduxState = $this->getJSONData($html);
$videos = [];
if ($this->getInput('c')) {
$videos = $reduxState->userChannel->videos->results;
$this->title = $reduxState->userChannel->info->name;
$videosMethod = 'videos(' . $this->getInput('c') . ')';
$channelInfoMethod = 'channelInfo({"userChannelId":' . $this->getInput('c') . '})';
$videos = $reduxState->api->queries->$videosMethod->data->results;
$this->title = $reduxState->api->queries->$channelInfoMethod->data->name;
} elseif ($this->getInput('p')) {
$playListVideosMethod = 'getPlaylistVideos(' . $this->getInput('p') . ')';
$videos = $reduxState->api->queries->$playListVideosMethod->data->results;
Expand Down

0 comments on commit a1b6a15

Please sign in to comment.