Skip to content

Commit

Permalink
Add getURI to lead to title page
Browse files Browse the repository at this point in the history
  • Loading branch information
yamanq committed Mar 31, 2022
1 parent c56e415 commit c8af804
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions bridges/MangaDexBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class MangaDexBridge extends BridgeAbstract {
const TITLE_REGEX = '#title/(?<uuid>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})#';

protected $feedName = '';
protected $feedURI = '';

protected function buildArrayQuery($name, $array) {
$query = '';
Expand All @@ -62,6 +63,7 @@ protected function getAPI() {
case 'Title Chapters':
preg_match(self::TITLE_REGEX, $this->getInput('url'), $matches)
or returnClientError('Invalid URL Parameter');
$this->feedURI = self::URI . 'title/' . $matches['uuid'];
$params['order[updatedAt]'] = 'desc';
if (!$this->getInput('external')) {
$params['includeFutureUpdates'] = '0';
Expand Down Expand Up @@ -94,6 +96,15 @@ public function getName() {
}
}

public function getURI() {
switch($this->queriedContext) {
case 'Title Chapters':
return $this->feedURI;
default:
return parent::getURI();
}
}

public function collectData() {
$api_uri = $this->getApi();
$header = array(
Expand Down

0 comments on commit c8af804

Please sign in to comment.