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:
parent
e3af5800b0
commit
898f843ee0
|
@ -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 = []
|
||||
|
|
Loading…
Reference in New Issue