From d39503de10793a294d35efac6fde36c5b53fc79b Mon Sep 17 00:00:00 2001 From: Paul Kirby Date: Mon, 27 Jan 2020 17:00:13 -0600 Subject: [PATCH] Channel List set to use new paginated SDK --- classes/LBRY_Daemon.php | 10 ++++++++-- templates/options_page.php | 1 - 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/classes/LBRY_Daemon.php b/classes/LBRY_Daemon.php index 62972f5..3db8337 100644 --- a/classes/LBRY_Daemon.php +++ b/classes/LBRY_Daemon.php @@ -87,12 +87,18 @@ class LBRY_Daemon /** * Returns a list of channels for this account * https://lbry.tech/api/sdk#channel_list + * @param int $page Pagination page number * @return array claim dictionary or null if empty */ - public function channel_list() + public function channel_list($page = 1) { + $params = array( + 'page' => $page, + 'page_size' => 20 + ); + try { - $result = $this->request('channel_list')->result; + $result = $this->request('channel_list', $params)->result->items; return empty($result) ? null : $result; } catch (LBRYDaemonException $e) { $this->logger->log('channel_list error', $e->getMessage() . ' | Code: ' . $e->getCode()); diff --git a/templates/options_page.php b/templates/options_page.php index 85e9dd2..320f2ea 100644 --- a/templates/options_page.php +++ b/templates/options_page.php @@ -17,7 +17,6 @@ $channel_list = $LBRY->daemon->channel_list();

Your Publishable Channels

-