✨ 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:
@@ -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
|
||||
"""
|
||||
|
||||
@@ -45,6 +45,7 @@ class ItchSourceIterator(SourceIterator):
|
||||
"version": shared.SPEC_VERSION,
|
||||
"added": int(time()),
|
||||
"source": self.source.id,
|
||||
"name": row[1],
|
||||
"game_id": self.source.game_id_format.format(game_id=row[0]),
|
||||
"executable": self.source.executable_format.format(cave_id=row[4]),
|
||||
}
|
||||
@@ -65,6 +66,7 @@ class ItchLinuxSource(ItchSource, LinuxSource):
|
||||
variant = "linux"
|
||||
executable_format = "xdg-open itch://caves/{cave_id}/launch"
|
||||
|
||||
@property
|
||||
@ItchSource.replaced_by_schema_key()
|
||||
@replaced_by_path("~/.var/app/io.itch.itch/config/itch/")
|
||||
@replaced_by_env_path("XDG_DATA_HOME", "itch/")
|
||||
@@ -77,6 +79,7 @@ class ItchWindowsSource(ItchSource, WindowsSource):
|
||||
variant = "windows"
|
||||
executable_format = "start itch://caves/{cave_id}/launch"
|
||||
|
||||
@property
|
||||
@ItchSource.replaced_by_schema_key()
|
||||
@replaced_by_env_path("appdata", "itch/")
|
||||
def location(self) -> Path:
|
||||
|
||||
Reference in New Issue
Block a user