From 61e4bd12084cc2bf0c42f4e4855ee40b08f73941 Mon Sep 17 00:00:00 2001 From: Fredrik Tolf Date: Tue, 19 Apr 2022 19:50:54 +0200 Subject: [PATCH] profile: Add mtime function to manga profile. --- manga/profile.py | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.11.0