From 628646c2ae40d6aa09ee96e3d83b265e7a87b552 Mon Sep 17 00:00:00 2001 From: xulifeng Date: Sat, 21 Nov 2015 13:28:51 +0800 Subject: [PATCH] fix the "out of index" exception: when search for "artists" or "album" and nothing returned, press l or enter makes it quit abnormally. --- src/menu.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/menu.py b/src/menu.py index b9c3596..0a3f737 100644 --- a/src/menu.py +++ b/src/menu.py @@ -125,7 +125,7 @@ def start(self): # 前进 elif key == ord('l') or key == 10: - if self.datatype == 'songs' or self.datatype == 'djchannels' or self.datatype == 'help': + if self.datatype == 'songs' or self.datatype == 'djchannels' or self.datatype == 'help' or len(self.datalist) <= 0: continue self.ui.build_loading() self.dispatch_enter(idx)