- turbo-stream for Chapter updates
- progressbar for chapter scrapping
- minor optimisations
This commit is contained in:
Jérémy Guillot
2024-07-17 20:20:19 +02:00
parent 4672886a67
commit 7fc2f15f6b
14 changed files with 111 additions and 63 deletions

View File

@@ -17,9 +17,9 @@ use Symfony\Component\Messenger\Attribute\AsMessageHandler;
readonly class DownloadChapterHandler
{
public function __construct(
private ChapterRepository $chapterRepository,
private MangaScraperService $mangaScraperService,
private NotificationService $notificationService,
private ChapterRepository $chapterRepository,
private MangaScraperService $mangaScraperService,
private NotificationService $notificationService,
private ContentSourceRepository $contentSourceRepository
)
{
@@ -46,8 +46,7 @@ readonly class DownloadChapterHandler
->setBaseUrl('https://api.mangadex.org/')
->setImageSelector('img')
->setChapterUrlFormat('at-home/server/%s')
->setScrapingType('mangadex')
;
->setScrapingType('mangadex');
// (new ContentSource())
// ->setBaseUrl('https://lelscans.net')

View File

@@ -32,7 +32,7 @@ readonly class RefreshMetadataHandler
$lastChapters = $this->mangadexProvider->addAllChaptersToManga($manga);
try {
foreach ($manga->getChapters() as $chapter) {
foreach ($lastChapters as $chapter) {
$this->entityManager->persist($chapter);
}