profile: Add mtime function to manga profile.
[automanga.git] / manga / profile.py
index cc0a4a1dc69e618a2648662ce7165f9f557bca77..2b7a15a4385c63fed7093ee736afd108ae43caad 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