Skip to content

Commit

Permalink
[MangaReaderBridge] Change feed title to manga name (RSS-Bridge#4092)
Browse files Browse the repository at this point in the history
  • Loading branch information
facutuesca committed May 7, 2024
1 parent d11b7f7 commit 1c3024f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bridges/MangaReaderBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,26 @@ class MangaReaderBridge extends BridgeAbstract
]
];

protected $feedName = '';


public function getName()
{
if (empty($this->feedName)) {
return parent::getName();
} else {
return $this->feedName;
}
}

public function collectData()
{
$url = $this->getInput('url');
$lang = $this->getInput('lang');
$dom = getSimpleHTMLDOM($url);
$aniDetail = $dom->getElementById('ani_detail');
$this->feedName = html_entity_decode($aniDetail->find('h2', 0)->plaintext);

$chapters = $dom->getElementById($lang . '-chapters');

foreach ($chapters->getElementsByTagName('li') as $chapter) {
Expand Down

0 comments on commit 1c3024f

Please sign in to comment.