Compare commits

4 Commits

Author SHA1 Message Date
96bb8613bd feat(music): 添加酷我音乐支持并替换QQ音乐功能
- 实现酷我音乐搜索和播放功能,替换原有的QQ音乐接口
- 更新歌词获取逻辑以适配酷我音乐API格式
- 修改音乐搜索和列表显示以支持酷我音乐数据结构
- 将Git仓库地址从公共域名切换到内部域名
- 更新版本号从4.3.6到4.3.7
- 调整音乐源选择界面标签为酷我音乐
2026-03-20 22:11:09 +08:00
ac8239c396 feat(music): 更新音乐下载源配置
- 新增酷我音乐作为下载源
- 移除QQ音乐下载源
- 更新版本号至v4.3.7
- 更新最新更新日期至2025.03.20
2026-03-20 22:10:57 +08:00
56ce2fac09 fix(config): 更新音乐播放配置以支持酷我音乐API
- 将默认音乐服务从QQ音乐更改为酷我音乐
- 替换API端点URL为酷我音乐接口
- 重新映射音质等级对应的数值参数
- 更新配置文件中的服务选择器设置
2026-03-20 22:10:41 +08:00
381816d5b9 chore(version): 更新版本号至4.3.7
- 将版本号从4.3.6更新到4.3.7
- 更新下载链接指向新版本4.3.7安装包
2026-03-20 22:10:30 +08:00
4 changed files with 38 additions and 31 deletions

View File

@ -154,19 +154,26 @@ def download_music(song_name, choose):
music_name = resp.json()["data"]["name"]
singer = resp.json()["data"]["singers"][0]["name"]
music_url = resp.json()["data"]["url"]
elif choice == "QQ":
elif choice == "KUWO":
resp = requests.get(f"{url}?msg={song_name}&n={choose}&limit=60&type=json&br={br}&key=oiapi-e3329f47-ccbc-2279-14b6-eabd4c7286ac")
resp.close()
songid = resp.json()["data"]["songid"]
resp1 = requests.get(f"https://oiapi.net/api/QQMusicLyric?id={songid}")
songid = resp.json()["data"]["id"]
try:
lrc = resp1.json()["message"]
resp_lrc = requests.get(f"https://www.kuwo.cn/openapi/v1/www/lyric/getlyric?musicId={songid}")
resp_lrc.close()
lrc = ""
lrclist = resp_lrc.json()["data"]["lrclist"]
for i in lrclist:
total_time = i["time"]
min = float(total_time) // 60
sec = float(total_time) % 60
lrc += f'[{int(min)}:{sec}]{i["lineLyric"]}\n'
except Exception as e:
print(f"download_qq_lrc: {e}")
print(f"download_kw_lrc: {e}")
lrc = ""
music_name = resp.json()["data"]["song"]
singer = resp.json()["data"]["singer"]
music_url = resp.json()["data"]["music"]
music_url = resp.json()["data"]["url"]
else:
lrc = ""
lrc = lrc.replace("\\n", "\n")
@ -276,7 +283,7 @@ def get_data_without_blocking(song_name):
songlist.delete(*songlist.get_children())
if choice == "WANGYIYUN":
url1 = f"{url}?name={song_name}&limit=60&type=json&key=oiapi-e3329f47-ccbc-2279-14b6-eabd4c7286ac"
elif choice == "QQ":
elif choice == "KUWO":
url1 = f"{url}?msg={song_name}&limit=60&type=json&key=oiapi-e3329f47-ccbc-2279-14b6-eabd4c7286ac"
resp = requests.get(url1)
jsondata = resp.json()
@ -287,10 +294,10 @@ def get_data_without_blocking(song_name):
full_name = jsondata["data"][index]["name"]
artist = jsondata["data"][index]["singers"][0]["name"]
album = jsondata["data"][index]["id"]
elif choice == "QQ":
elif choice == "KUWO":
full_name = jsondata["data"][index]["song"]
artist = jsondata["data"][index]["singer"]
album = jsondata["data"][index]["songid"]
album = jsondata["data"][index]["album"]
songlist.insert("", "end", values=(full_name, artist, album))
except requests.exceptions.JSONDecodeError:
resp_text = resp.text
@ -465,10 +472,10 @@ def display_sentences():
time.sleep(0.1)
poem = ""
try:
resp = requests.get("http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/random_quote")
resp = requests.get("http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/random_quote")
poem = resp.text.replace("\r", "").split("\n")
resp.close()
resp0 = requests.get("http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/announcement")
resp0 = requests.get("http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/announcement")
announcement_text = resp0.text.replace("\\n", "")
resp0.close()
poem = c(poem)
@ -657,12 +664,12 @@ def update():
if not os.path.exists(appdata + "/.NFLmusic/update"):
os.mkdir(appdata + "/.NFLmusic/update")
if not have_checked:
data_url = "http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/data"
data_url = "http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/data"
data_resp = requests.get(data_url)
data_resp.close()
datalist = data_resp.text.replace("\r", "").split("\n")
update_path = appdata + "/.NFLmusic/update/"
data_url = "http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/latest_update_log"
data_url = "http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/latest_update_log"
data_resp = requests.get(data_url).text
latest_version = datalist[0]
if latest_version != version:
@ -786,7 +793,7 @@ def check_update():
global datalist, have_checked
check_update_button["state"] = "disabled"
try:
data_url = "http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/data"
data_url = "http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/data"
data_resp = requests.get(data_url)
datalist = data_resp.text.replace("\r", "").split("\n")
latest_version = datalist[0]
@ -1181,7 +1188,7 @@ def load_versions():
global version_json
time.sleep(0.5)
try:
resp = requests.get("http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/version_list.json")
resp = requests.get("http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/version_list.json")
version_json = resp.json()
resp.close()
for version_item in version_json:
@ -1254,7 +1261,7 @@ def search_local_song():
time.sleep(1)
version = "4.3.6"
version = "4.3.7"
poem = ""
appdata = os.getenv("APPDATA")
make_resource()
@ -1558,7 +1565,7 @@ sponsors_list.place(x=10, y=210)
scrollbar3.config(command=sponsors_list.yview)
scrollbar3.place(x=227, y=210, height=240)
try:
data_url = "http://git.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/sponsors"
data_url = "http://internalgit.nanfengling.cn/NFL_jiancx/NFLmusic/raw/branch/master/version_info/sponsors"
data_resp = requests.get(data_url)
data_list = data_resp.text.replace("\r", "").split("\n")
for sponsor in data_list:
@ -1623,7 +1630,7 @@ themeLabel.place(x=10, y=25)
# 基本设置
repo_dict = {
"QQ音乐": "QQ",
"酷我音乐": "KUWO",
"网易云音乐": "WANGYIYUN",
}
repo_dict_reverse = {}

View File

@ -3,26 +3,25 @@ usercache = {
"theme": "sandstone",
"path": "./music",
"br": {
"QQ": "余韵绕梁",
"KUWO": "余韵绕梁",
"WANGYIYUN": "默认音质",
},
"choice": "QQ",
"choice": "KUWO",
"auto_update": True,
"playing_mode": 0,
"auto_play": False
}
api_data = {
"QQ": ["https://oiapi.net/api/QQ_Music",
"KUWO": ["https://oiapi.net/api/Kuwo",
{
"天籁浑成": 1,
"珠玉清华": 3,
"余韵绕梁": 4,
"珠玉清华": 5,
"余韵绕梁": 3,
"清越穿云": 2,
"幽微入化": 5,
"淳和致厚": 6,
"浊滞暗哑": 7,
"呕哑嘲哳": 8
"幽微入化": 7,
"浊滞暗哑": 4,
"呕哑嘲哳": 6
}
],
"WANGYIYUN": ["https://oiapi.net/api/Music_163",

View File

@ -1,3 +1,3 @@
4.3.6
4.3.7
http://pan.nanfengling.cn/f/4Qc2/update.exe
http://pan.nanfengling.cn/f/qVZTK/NFLmusicv4.3.6.exe
http://pan.nanfengling.cn/f/PXAFl/NFLmusicv4.3.7.exe

View File

@ -1,5 +1,6 @@
v4.3.6 - 2025.01.31
修复了音乐搜索结果为空的问题
v4.3.7 - 2025.03.20
新增了酷我音乐下载源
删除了QQ音乐下载源
本产品是南凤科技旗下的音乐下载器
旨在提升用户体验,