X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=manga%2Flocal.py;h=2d79b20bd0fa05e331f8c43c57e574632eeb2484;hb=ffd12e718bf1915abde0455fdf05a34d0632ed4d;hp=fe699a44f2c1bccdc7d65e1bcdaa4c814e96a9c5;hpb=fab0538835546d145a61ffe2771bcb0a23f89a50;p=automanga.git diff --git a/manga/local.py b/manga/local.py index fe699a4..2d79b20 100644 --- a/manga/local.py +++ b/manga/local.py @@ -185,8 +185,13 @@ class directory(dumb): ret.append(manga(pj(self.path, dent))) return ret + def search(self, expr): + expr = expr.lower() + return [manga(pj(self.path, dent)) for dent in os.listdir(self.path) if expr in dent.lower()] + def __iter__(self): for dent in os.listdir(self.path): yield manga(pj(self.path, dent)) + library = dumb