set date in menus class

This commit is contained in:
Stanislas Jouffroy 2025-06-13 23:42:41 +02:00
parent d968e89e07
commit 597b4c7f00
2 changed files with 6 additions and 6 deletions

View file

@ -20,14 +20,10 @@ class ResultFile:
if not self.path.exists():
return False
content = self.path.read_text()
return (
f"{sha256} - {menus.days[0]} - {menus.month} - {datetime.date.today().year}"
in content
)
return f"{sha256} - {menus.date()}" in content
def is_update(self, sha256: str, menus: Menus):
if not self.path.exists():
return False
content = self.path.read_text()
date = f"{menus.days[0]} - {menus.month} - {datetime.date.today().year}"
return f"{sha256} - {date}" not in content and date in content
return f"{sha256} - {menus.date()}" not in content and menus.date() in content