Basic filtering implemented

This commit is contained in:
coderkun 2012-06-30 14:48:53 +02:00
commit b8769ff0b7
2 changed files with 52 additions and 18 deletions

9
mcg.py
View file

@ -365,6 +365,15 @@ class MCGAlbum:
return self._hash
def filter(self, filter_string):
values = [self._artist, self._title, self._date]
values.extend(map(lambda track: track.get_title(), self._tracks))
for value in values:
if filter_string.lower() in value.lower():
return True
return False
class MCGTrack: