profile: Add mtime function to manga profile.
authorFredrik Tolf <fredrik@dolda2000.com>
Tue, 19 Apr 2022 17:50:54 +0000 (19:50 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Tue, 19 Apr 2022 17:50:54 +0000 (19:50 +0200)
manga/profile.py

index cc0a4a1..2b7a15a 100644 (file)
@@ -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