Fix test_add_uri_that_triggers_lookup_error
This commit is contained in:
parent
e0ffd7e7a1
commit
0186e3b56e
@ -255,7 +255,10 @@ class MpdFrontend(object):
|
||||
"""
|
||||
if songpos is not None:
|
||||
songpos = int(songpos)
|
||||
track = self.backend.library.lookup(uri)
|
||||
try:
|
||||
track = self.backend.library.lookup(uri)
|
||||
except LookupError:
|
||||
raise MpdAckError(u'[50@0] {add} directory or file not found')
|
||||
if track is not None:
|
||||
self.backend.current_playlist.add(track, at_position=songpos)
|
||||
return ('Id', track.id)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user