Make import time global, fix sorting bug

This commit is contained in:
kramo
2023-08-29 12:45:24 +02:00
parent 5680b08e1c
commit 8516e19d9d
12 changed files with 21 additions and 45 deletions

View File

@@ -19,7 +19,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from pathlib import Path
from time import time
from typing import NamedTuple
import yaml
@@ -38,13 +37,12 @@ class BottlesSourceIterable(SourceIterable):
data = self.source.locations.data["library.yml"].read_text("utf-8")
library: dict = yaml.safe_load(data)
added_time = int(time())
for entry in library.values():
# Build game
values = {
"source": self.source.source_id,
"added": added_time,
"added": shared.import_time,
"name": entry["name"],
"game_id": self.source.game_id_format.format(game_id=entry["id"]),
"executable": self.source.make_executable(