🐛 Fixed importer not finishing if no game found
This commit is contained in:
@@ -134,11 +134,22 @@ class Importer:
|
|||||||
source, *_rest = data
|
source, *_rest = data
|
||||||
logging.debug("Import done for source %s", source.id)
|
logging.debug("Import done for source %s", source.id)
|
||||||
self.n_source_tasks_done += 1
|
self.n_source_tasks_done += 1
|
||||||
|
self.progress_changed_callback()
|
||||||
|
|
||||||
def pipeline_advanced_callback(self, pipeline: Pipeline):
|
def pipeline_advanced_callback(self, pipeline: Pipeline):
|
||||||
"""Callback called when a pipeline for a game has advanced"""
|
"""Callback called when a pipeline for a game has advanced"""
|
||||||
if pipeline.is_done:
|
if pipeline.is_done:
|
||||||
self.n_pipelines_done += 1
|
self.n_pipelines_done += 1
|
||||||
|
self.progress_changed_callback()
|
||||||
|
|
||||||
|
def progress_changed_callback(self):
|
||||||
|
"""
|
||||||
|
Callback called when the import process has progressed
|
||||||
|
|
||||||
|
Triggered when:
|
||||||
|
* A source finishes
|
||||||
|
* A pipeline finishes
|
||||||
|
"""
|
||||||
self.update_progressbar()
|
self.update_progressbar()
|
||||||
if self.finished:
|
if self.finished:
|
||||||
self.import_callback()
|
self.import_callback()
|
||||||
|
|||||||
Reference in New Issue
Block a user