Engine and downloader refactoring (#50)

* Make downloaders subclass of base_downloader.py

* Link engines and downloaders together for all engines

* Replace / merge worker_factory.py with engine_manager.py
This commit is contained in:
2023-10-29 20:57:26 -05:00
committed by GitHub
parent 22aaa82da7
commit dcc0504d3c
11 changed files with 328 additions and 291 deletions

View File

@@ -21,7 +21,7 @@ class BaseRenderEngine(object):
@classmethod
def name(cls):
return cls.__name__.lower()
return str(cls.__name__).lower()
@classmethod
def default_renderer_path(cls):
@@ -39,6 +39,14 @@ class BaseRenderEngine(object):
def version(self):
raise NotImplementedError("version not implemented")
@staticmethod
def downloader(): # override when subclassing if using a downloader class
return None
@staticmethod
def worker_class(): # override when subclassing to link worker class
raise NotImplementedError("Worker class not implemented")
def get_help(self):
path = self.renderer_path()
if not path: