Store improvements
- Store games by source - Added convenience dunder methods (contains, iter, len, getitem) - Added store.get - Changed `enable_in_pipeline` for `toggle_in_pipeline`
This commit is contained in:
@@ -155,9 +155,10 @@ class DetailsWindow(Adw.Window):
|
||||
return
|
||||
|
||||
# Increment the number after the game id (eg. imported_1, imported_2)
|
||||
source_id = "imported"
|
||||
numbers = [0]
|
||||
game_id: str
|
||||
for game_id in shared.store.games:
|
||||
for game_id in shared.source_games[source_id]:
|
||||
prefix = "imported_"
|
||||
if not game_id.startswith(prefix):
|
||||
continue
|
||||
@@ -168,7 +169,7 @@ class DetailsWindow(Adw.Window):
|
||||
{
|
||||
"game_id": f"imported_{game_number}",
|
||||
"hidden": False,
|
||||
"source": "imported",
|
||||
"source": source_id,
|
||||
"added": int(time()),
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user