Adding a 'to list' conversion and correcting horrible mistake in comparison (put it reverse)
This commit is contained in:
parent
808770733f
commit
32b01f4e4a
@ -317,11 +317,13 @@ class TracklistController(object):
|
|||||||
criteria = criteria or kwargs
|
criteria = criteria or kwargs
|
||||||
matches = self._tl_tracks
|
matches = self._tl_tracks
|
||||||
for (key, value) in criteria.iteritems():
|
for (key, value) in criteria.iteritems():
|
||||||
|
if not type(value) is list:
|
||||||
|
value = [value]
|
||||||
if key == 'tlid':
|
if key == 'tlid':
|
||||||
matches = filter(lambda ct: value in ct.tlid, matches)
|
matches = filter(lambda ct: ct.tlid in value, matches)
|
||||||
else:
|
else:
|
||||||
matches = filter(
|
matches = filter(
|
||||||
lambda ct: value in getattr(ct.track, key), matches)
|
lambda ct: getattr(ct.track, key) in value, matches)
|
||||||
return matches
|
return matches
|
||||||
|
|
||||||
def move(self, start, end, to_position):
|
def move(self, start, end, to_position):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user