add fixed to work with empty path components

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%40210
This commit is contained in:
adrian.sampson 2009-04-12 04:53:02 +00:00
parent b2c73ae979
commit 13f7f57b17

View file

@ -859,14 +859,12 @@ class Server(BaseServer):
"""Adds a track or directory to the playlist, specified by a
path. If `send_id`, write each item's id to the client.
"""
components = path_to_list(path)
components = path_to_list(path, PATH_PH)
if len(components) <= 3:
# Add a single track.
it = self.lib.items(*components)
found_an_item = None
for item in it:
for item in self.lib.items(*components):
found_an_item = True
self.playlist.append(item)
if send_id: