commit
6d92e97c7c
@ -98,8 +98,8 @@ class Core(
|
|||||||
|
|
||||||
# We ignore cases when target state is set as this is buffering
|
# We ignore cases when target state is set as this is buffering
|
||||||
# updates (at least for now) and we need to get #234 fixed...
|
# updates (at least for now) and we need to get #234 fixed...
|
||||||
if (new_state == PlaybackState.PAUSED and not target_state
|
if (new_state == PlaybackState.PAUSED and not target_state and
|
||||||
and self.playback.state != PlaybackState.PAUSED):
|
self.playback.state != PlaybackState.PAUSED):
|
||||||
self.playback.state = new_state
|
self.playback.state = new_state
|
||||||
self.playback._trigger_track_playback_paused()
|
self.playback._trigger_track_playback_paused()
|
||||||
|
|
||||||
|
|||||||
@ -392,8 +392,8 @@ class TracklistController(object):
|
|||||||
criteria = criteria or kwargs
|
criteria = criteria or kwargs
|
||||||
matches = self._tl_tracks
|
matches = self._tl_tracks
|
||||||
for (key, values) in criteria.items():
|
for (key, values) in criteria.items():
|
||||||
if (not isinstance(values, collections.Iterable)
|
if (not isinstance(values, collections.Iterable) or
|
||||||
or isinstance(values, compat.string_types)):
|
isinstance(values, compat.string_types)):
|
||||||
# Fail hard if anyone is using the <0.17 calling style
|
# Fail hard if anyone is using the <0.17 calling style
|
||||||
raise ValueError('Filter values must be iterable: %r' % values)
|
raise ValueError('Filter values must be iterable: %r' % values)
|
||||||
if key == 'tlid':
|
if key == 'tlid':
|
||||||
|
|||||||
@ -124,8 +124,8 @@ def search(tracks, query=None, uris=None):
|
|||||||
return bool(t.name and q in t.name.lower())
|
return bool(t.name and q in t.name.lower())
|
||||||
|
|
||||||
def album_filter(t):
|
def album_filter(t):
|
||||||
return bool(t.album and t.album.name
|
return bool(t.album and t.album.name and
|
||||||
and q in t.album.name.lower())
|
q in t.album.name.lower())
|
||||||
|
|
||||||
def artist_filter(t):
|
def artist_filter(t):
|
||||||
return bool(filter(lambda a:
|
return bool(filter(lambda a:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user