Play_all: If there are no selection, play all audios

This commit is contained in:
Manuel Cortez 2016-03-23 11:36:07 -06:00
parent 8ae5718647
commit 8500f2d327

View File

@ -157,6 +157,8 @@ class audioBuffer(feedBuffer):
def play_all(self, *args, **kwargs): def play_all(self, *args, **kwargs):
selected = self.tab.list.get_selected() selected = self.tab.list.get_selected()
if selected == -1:
selected = 0
audios = [i["url"] for i in self.session.db[self.name]["items"][selected:]] audios = [i["url"] for i in self.session.db[self.name]["items"][selected:]]
pub.sendMessage("play-audios", audios=audios) pub.sendMessage("play-audios", audios=audios)