Basic filtering implemented
This commit is contained in:
parent
1fe9ce31a2
commit
b8769ff0b7
2 changed files with 52 additions and 18 deletions
9
mcg.py
9
mcg.py
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue