Пример #1
0
        public async Task <int> Run(string[] args)
        {
            SiteSelector siteSelector = GetSiteSelectorFromArgs(args);

            _siteService = _factorySite.GetSite(siteSelector.Type);
            _siteService.SetSiteSelector(siteSelector);

            var folderName = await _siteService.GetMangaName();

            var links = await _siteService.GetAllLinks(_fromChapterNumber);

            _documentService.CreateNewFolder(folderName);
            var linksToDownload = _siteService.RemoveLinksAlreadyDownload(links, folderName);

            GenerateBook(linksToDownload, folderName);

            return(1);
        }