upsies.utils.predbs.multi
Classes
- class upsies.utils.predbs.multi.MultiPredbApi(predbs=None)[source]
Bases:
objectWrapper around multiple
PredbApiBaseinstancesEach method loops over every provided predb and calls the same method on it. The first call that does not raise
RequestErrororNotImplementedErroris returned.If no call succeeds and any exceptions were raised, they are combined into a single
RequestError, which is raised. If every call raisedNotImplementedError, a combinedNotImplementedErroris raised.- Parameters:
predbs – Sequence of
PredbApiBaseinstances
- property predbs
Sequence of
PredbApiBasethat are used
- async verify_release_name(content_path, release_name)[source]
Raise if release was renamed
- Parameters:
content_path – Path to release file or directory
release_name – Known exact release name, e.g. from
search()results
- Raises:
SceneRenamedError – if release was renamed
SceneError – if release_name is not a scene release
NotImplementedError – if
release_files()raises it
- async verify_release_files(content_path, release_name)[source]
Check if existing files have the correct size
- Parameters:
content_path – Path to release file or directory
release_name – Known exact release name, e.g. from
search()results
The return value is a sequence of
SceneErrorexceptions:SceneFileSizeErrorif a file has the wrong sizeSceneMissingInfoErrorif the correct file size of file cannot be foundSceneErrorif release_name is not a scene release
- async verify_release(content_path, release_name=None)[source]
Find matching scene releases and apply
verify_release_name()andverify_release_files()- Parameters:
content_path – Path to release file or directory
release_name – Known exact release name or None to
search()for content_path
- Returns:
SceneCheckResultenum fromis_scene_release()and sequence ofSceneErrorexceptions fromverify_release_name()andverify_release_files()