From 8f70899855845818dcda77f22e56eefc1c4c116c Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 20 Jun 2014 21:10:34 +0200 Subject: [PATCH] mpd: Minor code style tweak. --- mopidy/mpd/dispatcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mopidy/mpd/dispatcher.py b/mopidy/mpd/dispatcher.py index 30e72be3..93575ed6 100644 --- a/mopidy/mpd/dispatcher.py +++ b/mopidy/mpd/dispatcher.py @@ -295,7 +295,7 @@ class MpdContext(object): for part in path_parts: for ref in self.core.library.browse(uri).get(): - if ((ref.type == ref.DIRECTORY or ref.type == ref.PLAYLIST) and + if (ref.type in (ref.DIRECTORY, ref.type == ref.PLAYLIST) and ref.name == part): uri = ref.uri break @@ -310,7 +310,7 @@ class MpdContext(object): base_path, future = path_and_futures.pop() for ref in future.get(): path = '/'.join([base_path, ref.name.replace('/', '')]) - if ref.type == ref.DIRECTORY or ref.type == ref.PLAYLIST: + if ref.type in (ref.DIRECTORY, ref.PLAYLIST): yield (path, None) if recursive: path_and_futures.append(