libsaria: Check that sources have an id before looking up a file

If next() in libsaria.sources doesn't get an id from the queue or
playlist, then we shouldn't try to look up a filepath.  We return None
instead.
This commit is contained in:
Bryan Schumaker 2011-05-15 10:28:24 -04:00
parent e3af5800b0
commit 898f843ee0
1 changed files with 3 additions and 2 deletions

View File

@ -66,8 +66,9 @@ def next():
id = queue.next()
if id == None:
id = playlist.get_next(cur_id)
cur_id = id
return library.get_attrs(cur_id, "filepath")
if id != None:
cur_id = id
return library.get_attrs(cur_id, "filepath")
def list_source(source, *attrs):
ret = []