MCPcopy Create free account
hub / github.com/BrettMayson/Arma3Server / download_workshop

Function download_workshop

api.py:105–112  ·  view source on GitHub ↗
(client, workshop_id)

Source from the content-addressed store, hash-verified

103 download_files(client, cdn_client, files, destination="server/")
104
105def download_workshop(client, workshop_id):
106 cdn_client = CDNClient(client)
107 workshop_manifest = cdn_client.get_manifest_for_workshop_item(workshop_id)
108 files_generator = workshop_manifest.iter_files()
109 files = list(files_generator)
110 files = [f for f in files if f.is_file]
111 print(f"Found {len(files)} files to download")
112 download_files(client, cdn_client, files, destination=f"server/workshop/{workshop_id}/")
113
114def download_files(client, cdn_client, files, destination):
115 print(f"Verifying {len(files)} files...")

Callers 1

api.pyFile · 0.85

Calls 1

download_filesFunction · 0.85

Tested by

no test coverage detected