From: Fredrik Tolf Date: Tue, 19 Apr 2022 17:50:54 +0000 (+0200) Subject: profile: Add mtime function to manga profile. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=61e4bd12084cc2bf0c42f4e4855ee40b08f73941;p=automanga.git profile: Add mtime function to manga profile. --- diff --git a/manga/profile.py b/manga/profile.py index cc0a4a1..2b7a15a 100644 --- a/manga/profile.py +++ b/manga/profile.py @@ -219,6 +219,12 @@ class filemanga(manga): else: f.write(consline("lset", key, *val) + "\n") + def mtime(self): + try: + return os.stat(self.path).st_mtime + except FileNotFoundError: + return 0 + class profile(object): def __init__(self, dir): self.dir = dir