From c711916f937f1a279d152ca248f4c98c61deeb5c Mon Sep 17 00:00:00 2001 From: wyg1997 Date: Sat, 21 Dec 2019 11:14:50 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8Durl=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E6=92=AD=E6=94=BE=E5=99=A8=E5=B4=A9=E6=BA=83?= =?UTF-8?q?=E9=97=AE=E9=A2=98(#792)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NEMbox/player.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/NEMbox/player.py b/NEMbox/player.py index 5e196129..f66e904c 100644 --- a/NEMbox/player.py +++ b/NEMbox/player.py @@ -227,6 +227,10 @@ def switch(self): self.build_playinfo() def run_mpg123(self, on_exit, url, expires=-1, get_time=-1): + if url is None: + self.next() + return -1 + para = ["mpg123", "-R"] + self.config_mpg123 self.popen_handler = subprocess.Popen( para, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE @@ -320,7 +324,7 @@ def start_playing(self, on_exit, args): ) else: new_url = NetEase().songs_url([args["song_id"]])[0]["url"] #使用新地址 - if not new_url: #如果没有获得新地址 + if not new_url: #如果没有获得新地址 new_url = args["mp3_url"] #使用老地址传给mpg123 thread = threading.Thread( target=self.run_mpg123,