X-Git-Url: http://dolda2000.com/gitweb/?p=automanga.git;a=blobdiff_plain;f=manga%2Flocal.py;h=2d79b20bd0fa05e331f8c43c57e574632eeb2484;hp=fe699a44f2c1bccdc7d65e1bcdaa4c814e96a9c5;hb=ffd12e718bf1915abde0455fdf05a34d0632ed4d;hpb=5e98c1aa8cfadcb81cd9ebb61a1e6352c6e16e80 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