aboutsummaryrefslogtreecommitdiff
path: root/bridges/AO3Bridge.php
diff options
context:
space:
mode:
Diffstat (limited to 'bridges/AO3Bridge.php')
-rw-r--r--bridges/AO3Bridge.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/bridges/AO3Bridge.php b/bridges/AO3Bridge.php
index 970ed414..7e18b657 100644
--- a/bridges/AO3Bridge.php
+++ b/bridges/AO3Bridge.php
@@ -27,6 +27,7 @@ class AO3Bridge extends BridgeAbstract
'Entire work' => 'all',
],
],
+ 'limit' => self::LIMIT,
],
'Bookmarks' => [
'user' => [
@@ -84,6 +85,8 @@ class AO3Bridge extends BridgeAbstract
}
$this->title = $heading->plaintext;
+ $limit = $this->getInput('limit') ?? 3;
+ $count = 0;
foreach ($html->find('.index.group > li') as $element) {
$item = [];
@@ -118,7 +121,7 @@ class AO3Bridge extends BridgeAbstract
$item['uid'] = $item['uri'] . "/$strdate/$chapters";
// Fetch workskin of desired chapter(s) in list
- if ($this->getInput('range')) {
+ if ($this->getInput('range') && ($limit == 0 || $count++ < $limit)) {
$url = $item['uri'];
switch ($this->getInput('range')) {
case ('all'):