Some depots now have a dict like {"public": {"gid": GID, ...}, ...}
where we would traditionally have seen a flat dict {"public": GID, ...}.
Not all depots have this: at the time of writing,
1628350 "Steam Linux Runtime - Sniper" does, but
1391110 "Steam Linux Runtime - Soldier" does not. Presumably this is a
change that is being rolled out gradually to let the Steam client give
better estimates of the size of a depot.
Cope with either format, by retrieving the gid field if the nested dict
is present.
Resolves: https://github.com/ValvePython/steam/issues/436
Signed-off-by: Simon McVittie <[email protected]>
App ID 1628350 "Steam Linux Runtime - Sniper" contains depot 1628351,
which has no name, causing steam.client.cdn.CDNClient to crash with
a KeyError while retrieving manifests from that depot. Fall back to
using the depot ID as a placeholder name.
Signed-off-by: Simon McVittie <[email protected]>
* fixed VZ decompressoin and add some checks
* add get_manifest() which returns a list of CDNDepotManifest for app_id and branch
* add iter_files() which will get all manifests, and iter files for app_id and branch
* add get_manifest_for_workshop_item() can be used to download steampiped hosted workshop items
* add basic caching inside CDNClient
* CDNDepotManifest, which enhances DepotManifest and inits CDNDepotFiles
* CDNDepotFile expands DepotFile to a file like object that can be used to directly seek and
read files from steampipe
* DepotFile for Manifest mappings
* CDNClient now handles content servers selection better
* CDNClient can auto get and cache cdn auth tokens and depot keys
* added get_chunk() to CDNClient, only ZIP compression, TODO LZMA