def create_task(source): """ Takes source and auto fires of download process :param source: dict :return: None """ if not source.get("type") in VALID_SOURCE_TYPES: raise InvalidSourceType(source.get("type")) debrid_class = _get_debrid_downloader_class(source) debrid_class.download()
def _confirm_source_downloadable(self): if not self.source.get("type") in VALID_SOURCE_TYPES: raise InvalidSourceType(self.source.get("type"))