forked from setnicka/ulozto-downloader
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend separated from the download core
This humongous patch separates download core from the frontend. It will make any new frontends (web, …) and batch usage of the ulozto-downloader much more easy to make. Previously every worker writes to the console independently (only targeting the right console row). Now every worker saves data in the DownloadPart struct, from where teh data is taken by some frontend. Frontend is injected as dependency using Frontend abstract class which defines API interface between core and the frontend. It is not yet stable, some changes will be probably needed in the future. Now only the ConsoleFrontend is implemented. It would be nice to refactor it using ncurses (it is possible now, because only one process writes to the console). Also CaptchaSolver abstract class was developed, primarily to allow easy passing of the log func for the CAPTCHA part. As side effect it also provides nice defined API :)
- Loading branch information
Showing
8 changed files
with
475 additions
and
294 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.