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