Skip to content

Commit d1814ee

Browse files
committed
feat: update stats condition
1 parent 5eed5e3 commit d1814ee

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

scripts/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,19 @@ def get_last_added_mods(cls, mods: list[Mod], nb: int = 10) -> list[Mod]:
106106

107107
@classmethod
108108
def get_last_updated_mods(cls, mods: list[Mod], nb: int = 10) -> list[Mod]:
109-
active_mods = [mod for mod in mods if ModStatus.UNRELEASED not in mod.status]
109+
active_mods = [
110+
mod for mod in mods if not mod.status & {ModStatus.UNRELEASED, ModStatus.HIDDEN}
111+
]
110112
active_mods.sort(key=lambda x: x.last_update)
111113
return active_mods[-nb:][::-1]
112114

113115
@classmethod
114116
def get_missing_mods(cls, mods: list[Mod]) -> list[Mod]:
115-
return [mod for mod in mods if ModStatus.MISSING in mod.status]
117+
return [
118+
mod
119+
for mod in mods
120+
if ModStatus.MISSING in mod.status and ModStatus.EMBED not in mod.status
121+
]
116122

117123
@classmethod
118124
def get_without_author_mods(cls, mods: list[Mod]) -> list[Mod]:

0 commit comments

Comments
 (0)