diff --git a/mopidy/core/actor.py b/mopidy/core/actor.py index bc8df64d..19e49838 100644 --- a/mopidy/core/actor.py +++ b/mopidy/core/actor.py @@ -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() diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index c54e6784..08d08329 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -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': diff --git a/mopidy/local/search.py b/mopidy/local/search.py index 18dad82c..e63d0f8d 100644 --- a/mopidy/local/search.py +++ b/mopidy/local/search.py @@ -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: