diff --git a/NFLmusic.py b/NFLmusic.py index a1a551d..5c792e9 100644 --- a/NFLmusic.py +++ b/NFLmusic.py @@ -177,18 +177,18 @@ def download_music(song_name, choose): singer = resp.json()["singer"] music_url = resp.json()["music_url"] elif choice == "QQ": - resp = requests.get(f"{url}?msg={song_name}&n={choose}&num=60&type=json") + resp = requests.get(f"{url}?msg={song_name}&n={choose}&num=60&type=json&br={br}") resp.close() try: lrc = resp.json()["data"]["lyric"] except Exception as e: print(f"download_qq_lrc: {e}") lrc = "" - music_name = resp.json()["data"]["title"] - singer = resp.json()["data"]["singer"] + music_name = resp.json()["data"]["song_name"] + singer = resp.json()["data"]["song_singer"] music_url = resp.json()["data"]["music_url"] elif choice == "KUGOU": - resp = requests.get(f"{url}?gm={song_name}&n={choose}&num=60&type=json") + resp = requests.get(f"{url}?gm={song_name}&n={choose}&num=60&type=json&quality={br}") resp.close() try: lrc = resp.json()["lyrics"] @@ -210,7 +210,7 @@ def download_music(song_name, choose): singer = resp.json()["data"]["singer"] music_url = resp.json()["data"]["url"] elif choice == "XIAOFEN": - resp = requests.get(f"{url}?msg={song_name}&n={choose}&num=60&type=json") + resp = requests.get(f"{url}?msg={song_name}&n={choose}&num=60&type=json&br={br}") resp.close() try: lrc = resp.json()["lrc"] @@ -350,8 +350,8 @@ def get_data_without_blocking(song_name): artist = jsondata[index]["singer"] album = jsondata[index]["songid"] elif choice == "QQ": - full_name = jsondata[index]["title"] - artist = jsondata[index]["singer"] + full_name = jsondata[index]["song_title"] + artist = jsondata[index]["song_singer"] album = "" elif choice == "KUGOU": full_name = jsondata[index]["title"] @@ -1310,7 +1310,7 @@ def search_local_song(): time.sleep(1) -version = "4.2.0" +version = "4.2.1" poem = "" appdata = os.getenv("APPDATA") make_resource() @@ -1329,6 +1329,8 @@ try: br_list = [br for br in br_dict] path = jsondata["path"] br = jsondata["br"][choice] + if br not in br_list: + br = ij.usercache["br"][choice] auto_update = jsondata["auto_update"] playingmode = jsondata["playing_mode"] auto_play = jsondata["auto_play"] @@ -1344,6 +1346,8 @@ except: br_list = [br for br in br_dict] path = jsondata["path"] br = jsondata["br"][choice] + if br not in br_list: + br = ij.usercache["br"][choice] auto_update = jsondata["auto_update"] playingmode = jsondata["playing_mode"] auto_play = jsondata["auto_play"]