Added Itch source

- Added call stack to unretryable errors in managers
- Added existing itch cover downloading code
- Fixed importer not closing if no source enabled

TODO
- Tidying the itch cover downloading code
- If possible, make save_cover and resize_cover work in AsyncManager-s
This commit is contained in:
GeoffreyCoulaud
2023-06-07 15:33:00 +02:00
parent 5dc6ec899a
commit 9ebd7cf7ee
5 changed files with 69 additions and 19 deletions

View File

@@ -61,10 +61,6 @@ class Importer:
self.create_dialog()
# Single SGDB cancellable shared by all its tasks
# (If SGDB auth is bad, cancel all SGDB tasks)
self.sgdb_cancellable = Gio.Cancellable()
for source in self.sources:
logging.debug("Importing games from source %s", source.id)
task = Task.new(None, None, self.source_callback, (source,))
@@ -72,6 +68,8 @@ class Importer:
task.set_task_data((source,))
task.run_in_thread(self.source_task_thread_func)
self.progress_changed_callback()
def create_dialog(self):
"""Create the import dialog"""
self.progressbar = Gtk.ProgressBar(margin_start=12, margin_end=12)
@@ -164,6 +162,7 @@ class Importer:
Callback called when the import process has progressed
Triggered when:
* All sources have been started
* A source finishes
* A pipeline finishes
"""