flexget.plugins.modify.path_by_space module#
- class flexget.plugins.modify.path_by_space.DiskStats(path, free_bytes, used_bytes, total_bytes, free_percent, used_percent)[source]#
Bases:
NamedTuple- Parameters:
- classmethod _make(iterable)#
Make a new DiskStats object from a sequence or iterable
- _asdict()#
Return a new dict which maps field names to their values.
- _replace(**kwds)#
Return a new DiskStats object replacing specified fields with new values
- _field_defaults = {}#
- _fields = ('path', 'free_bytes', 'used_bytes', 'total_bytes', 'free_percent', 'used_percent')#
- class flexget.plugins.modify.path_by_space.PluginPathBySpace[source]#
Bases:
objectAllow setting a field to a folder based on it’s space.
Path will be selected at random if multiple paths match the within
Example:
path_by_space: select: most_free_percent # or most_free, most_used, most_used_percent, has_free within: 9000 # within in MB or percent. paths: - /drive1/ - /drive2/ - /drive3/
- schema = {'additionalProperties': False, 'properties': {'paths': {'oneOf': [{'items': {'format': 'path', 'title': 'single value', 'type': 'string'}, 'minItems': 1, 'title': 'multiple values', 'type': 'array', 'uniqueItems': False}, {'format': 'path', 'title': 'single value', 'type': 'string'}]}, 'select': {'enum': ['most_free', 'most_used', 'most_free_percent', 'most_used_percent'], 'type': 'string'}, 'to_field': {'default': 'path', 'type': 'string'}, 'within': {'oneOf': [{'format': 'size', 'type': 'string'}, {'format': 'percent', 'type': 'string'}]}}, 'required': ['paths', 'select'], 'type': 'object'}#