mirror of
https://github.com/aclist/dztui.git
synced 2026-10-30 14:42:54 +01:00
feat: namespace mod hashes
This commit is contained in:
1 parent
b35b6148bc
commit
8503d7e698
2 files changed
+11
-6
No files matched your search
+6
-2
@@ -119,10 +119,14 @@ def get_missing_mods(local: list, remote: list) -> list:
|
|||||||
return [mod for mod in remote if mod not in local]
|
return [mod for mod in remote if mod not in local]
|
||||||
|
|
||||||
|
|
||||||
def _hash(uid: str) -> str:
|
def _hash(uid: str, use_custom: bool = False) -> str:
|
||||||
md5 = hashlib.md5()
|
md5 = hashlib.md5()
|
||||||
md5.update(uid.encode("ascii"))
|
md5.update(uid.encode("ascii"))
|
||||||
return "@" + md5.hexdigest()[:8]
|
if use_custom:
|
||||||
|
prefix = "@C"
|
||||||
|
else:
|
||||||
|
prefix = "@"
|
||||||
|
return prefix + md5.hexdigest()[:8]
|
||||||
|
|
||||||
|
|
||||||
def remove_stale_signatures(config: Path, versions: Path) -> None:
|
def remove_stale_signatures(config: Path, versions: Path) -> None:
|
||||||
|
|||||||
@@ -102,11 +102,11 @@ class ModFrame(HeadingFrame):
|
|||||||
self.tree_vbox.extend([self.scrolled, self.status])
|
self.tree_vbox.extend([self.scrolled, self.status])
|
||||||
|
|
||||||
self.vbox.pack_end(self.tree_vbox, expand=True, fill=True, padding=3)
|
self.vbox.pack_end(self.tree_vbox, expand=True, fill=True, padding=3)
|
||||||
# self.vbox.add(self.tree_vbox)
|
|
||||||
self.frame.add(self.vbox)
|
self.frame.add(self.vbox)
|
||||||
#self.none_label = Gtk.Label(label="No mods found", halign=Gtk.Align.START)
|
# self.vbox.add(self.tree_vbox)
|
||||||
#self.vbox.pack_end(self.none_label, expand=True, fill=True, padding=3)
|
# self.none_label = Gtk.Label(label="No mods found", halign=Gtk.Align.START)
|
||||||
#self.none_label.hide()
|
# self.vbox.pack_end(self.none_label, expand=True, fill=True, padding=3)
|
||||||
|
# self.none_label.hide()
|
||||||
|
|
||||||
sel = self.tree.get_selection()
|
sel = self.tree.get_selection()
|
||||||
sel.connect("changed", self._on_selection_changed)
|
sel.connect("changed", self._on_selection_changed)
|
||||||
@@ -330,5 +330,6 @@ class OfflineLoader(Gtk.Box):
|
|||||||
# mission = self.mission_frame.get_mission()
|
# mission = self.mission_frame.get_mission()
|
||||||
# local_mods = self.local_frame.get_mods()
|
# local_mods = self.local_frame.get_mods()
|
||||||
# custom_mods = self.custom_frame.get_mods()
|
# custom_mods = self.custom_frame.get_mods()
|
||||||
|
# cf. api.mods._hash(uid, use_custom=True)
|
||||||
# self.offline_man.setup(appid, mission, local_mods, custom_mods)
|
# self.offline_man.setup(appid, mission, local_mods, custom_mods)
|
||||||
pass
|
pass
|
||||||
Reference in new issue
Block a user