upsies.utils.predbs.multi

Classes

class upsies.utils.predbs.multi.MultiPredbApi(predbs=None)[source]

Bases: object

Wrapper around multiple PredbApiBase instances

Each method loops over every provided predb and calls the same method on it. The first call that does not raise RequestError or NotImplementedError is returned.

If no call succeeds and any exceptions were raised, they are combined into a single RequestError, which is raised. If every call raised NotImplementedError, a combined NotImplementedError is raised.

Parameters:

predbs – Sequence of PredbApiBase instances

property predbs

Sequence of PredbApiBase that are used

search = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
release_files = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
is_scene_release = <async_lru._LRUCacheWrapperInstanceMethod object>[source]
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:
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 SceneError exceptions:

async verify_release(content_path, release_name=None)[source]

Find matching scene releases and apply verify_release_name() and verify_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:

SceneCheckResult enum from is_scene_release() and sequence of SceneError exceptions from verify_release_name() and verify_release_files()