1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-12 19:44:12 +02:00

fix: various fixes (#3136)

This commit is contained in:
Dag
2022-11-08 21:17:32 +01:00
committed by GitHub
parent 00ff0890bb
commit b64f8f2a09
3 changed files with 27 additions and 15 deletions

View File

@@ -84,12 +84,16 @@ query VODList($channel: String!, $types: [BroadcastType!]) {
}
}
EOD;
$channel = $this->getInput('channel');
$type = $this->getInput('type');
$variables = [
'channel' => $this->getInput('channel'),
'types' => self::BROADCAST_TYPES[$this->getInput('type')]
'channel' => $channel,
'types' => self::BROADCAST_TYPES[$type]
];
$data = $this->apiRequest($query, $variables);
if ($data->user === null) {
throw new \Exception(sprintf('Unable to find channel `%s`', $channel));
}
$user = $data->user;
foreach ($user->videos->edges as $edge) {
$video = $edge->node;