Skip to content

Commit

Permalink
fix(tapas): bug in prior refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
dvikan committed Oct 15, 2023
1 parent 611fabe commit 0b82fc4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bridges/TapasBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function collectData()
if (preg_match('/^[\d]+$/', $this->getInput('title'))) {
$this->id = $this->getInput('title');
}
if ($this->getInput('force_title') or !$this->id) {
if ($this->getInput('force_title') || !$this->id) {
$html = getSimpleHTMLDOM($this->getURI()) or returnServerError('Could not request ' . $this->getURI());
$this->id = $html->find('meta[property$=":url"]', 0)->content;
$this->id = str_ireplace(['tapastic://series/', '/info'], '', $this->id);
Expand All @@ -53,6 +53,7 @@ protected function parseItem(array $item)
// }
// }

$item['content'] ??= '';
if ($this->getInput('extend_content')) {
$html = getSimpleHTMLDOM($item['uri']);
$item['content'] = $item['content'] ?? '';
Expand All @@ -77,6 +78,6 @@ public function getURI()
if ($this->id) {
return self::URI . 'rss/series/' . $this->id;
}
return self::URI;
return self::URI . 'series/' . $this->getInput('title') . '/info/';
}
}

0 comments on commit 0b82fc4

Please sign in to comment.