Bulk asynchronous downloader for multiple file hosts
Python asynciobunkrcyberdropdownloaderdropboxfilestergofilegoogle-drivemediafiremegamega-nzonedrivepatreonpawchivepinterestpixeldraintransfer-ittwitchtwittervk
cleanup some function declarations and comments
Jules-WinnfieldX721cd72311a1
diff --git a/cyberdrop_dl/main.py b/cyberdrop_dl/main.pyindex 111581873..27882721e 100644--- a/cyberdrop_dl/main.py+++ b/cyberdrop_dl/main.py@@ -10,7 +10,7 @@ from cyberdrop_dl.scraper.scraper import ScrapeMapperfrom cyberdrop_dl.ui.ui import program_ui-def startup():+def startup() -> Manager:"""Starts the program and returns the managerThis will also run the UI for the program@@ -38,7 +38,8 @@ def startup():exit(0)-async def runtime(manager: Manager):+async def runtime(manager: Manager) -> None:+ """Main runtime loop for the program, this will run until all scraping and downloading is complete"""scrape_mapper = ScrapeMapper(manager)download_manager = manager.download_managerasyncio.create_task(scrape_mapper.map_urls())@@ -49,7 +50,8 @@ async def runtime(manager: Manager):await asyncio.sleep(1)-async def director(manager: Manager):+async def director(manager: Manager) -> None:+ """Runs the program and handles the UI"""await manager.async_startup()with Live(manager.progress_manager.layout, refresh_per_second=manager.progress_manager.refresh_rate):diff --git a/cyberdrop_dl/utils/transfer/transfer_v4_config.py b/cyberdrop_dl/utils/transfer/transfer_v4_config.pyindex 992ed46bf..f06cf9a73 100644--- a/cyberdrop_dl/utils/transfer/transfer_v4_config.py+++ b/cyberdrop_dl/utils/transfer/transfer_v4_config.py@@ -21,7 +21,7 @@ def _load_yaml(file: Path) -> Dict:return yaml.load(yaml_file.read(), Loader=yaml.FullLoader)-def transfer_v4_config(manager: Manager, old_config_path: Path, new_config_name: str):+def transfer_v4_config(manager: Manager, old_config_path: Path, new_config_name: str) -> None:"""Transfers a V4 config into V5 possession"""new_auth_data = manager.config_manager.authentication_datanew_user_data = copy.deepcopy(settings)diff --git a/cyberdrop_dl/utils/transfer/transfer_v4_db.py b/cyberdrop_dl/utils/transfer/transfer_v4_db.pyindex 46e046910..9682312f0 100644--- a/cyberdrop_dl/utils/transfer/transfer_v4_db.py+++ b/cyberdrop_dl/utils/transfer/transfer_v4_db.py@@ -5,6 +5,7 @@ from cyberdrop_dl.utils.db.table_definitions import create_history, create_cachedef transfer_v4_db(db_path: Path, new_db_path: Path) -> None:+ """Transfers a V4 database into V5 possession"""old_db_connection = sqlite3.connect(db_path)new_db_connection = sqlite3.connect(new_db_path)