Compare commits
4 Commits
2967b66bf8
...
bbe244e125
| Author | SHA1 | Date | |
|---|---|---|---|
| bbe244e125 | |||
| 12a8b3714c | |||
| 5ede789385 | |||
| d8a03ce0e7 |
20
NFLmusic.py
20
NFLmusic.py
@ -204,6 +204,20 @@ def download_music(song_name, choose):
|
|||||||
resp.close()
|
resp.close()
|
||||||
try:
|
try:
|
||||||
lrc = resp.json()["data"]["lyric"]
|
lrc = resp.json()["data"]["lyric"]
|
||||||
|
print(lrc)
|
||||||
|
# 正则表达式匹配 [mm:ss]
|
||||||
|
def convert_timestamp(match):
|
||||||
|
mm_ss = match.group(1)
|
||||||
|
minutes, seconds = mm_ss.split(':')
|
||||||
|
# 转换为浮点秒数并保留一位小数(虽然这里是整数)
|
||||||
|
total_seconds = int(minutes) * 60 + int(seconds)
|
||||||
|
# 格式化回 mm:ss.s 形式
|
||||||
|
new_minutes = total_seconds // 60
|
||||||
|
new_seconds = total_seconds % 60
|
||||||
|
return f"[{new_minutes:02d}:{new_seconds:02d}.0]"
|
||||||
|
|
||||||
|
# 替换所有 [mm:ss] 为 [mm:ss.0]
|
||||||
|
lrc = re.sub(r'\[(\d{2}:\d{2})\]', convert_timestamp, lrc)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(f"download_kg_lrc: {e}")
|
print(f"download_kg_lrc: {e}")
|
||||||
lrc = ""
|
lrc = ""
|
||||||
@ -483,8 +497,8 @@ def playsound(*event):
|
|||||||
playmusic(abs_path)
|
playmusic(abs_path)
|
||||||
try:
|
try:
|
||||||
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
lyric = lyrics.load_lyrics(f"{path}/{music_file_without_endswith}.lrc")
|
||||||
except:
|
except Exception as e:
|
||||||
pass
|
print(type(e), e)
|
||||||
|
|
||||||
|
|
||||||
def playmusic(music_path):
|
def playmusic(music_path):
|
||||||
@ -1314,7 +1328,7 @@ def search_local_song():
|
|||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|
||||||
version = "4.3.3"
|
version = "4.3.4"
|
||||||
poem = ""
|
poem = ""
|
||||||
appdata = os.getenv("APPDATA")
|
appdata = os.getenv("APPDATA")
|
||||||
make_resource()
|
make_resource()
|
||||||
|
|||||||
@ -13,7 +13,6 @@ def load_lyrics(file):
|
|||||||
timestamp = f'{minutes:02}:{seconds:02}'
|
timestamp = f'{minutes:02}:{seconds:02}'
|
||||||
text = match.group(3)
|
text = match.group(3)
|
||||||
lyrics[timestamp] = text
|
lyrics[timestamp] = text
|
||||||
|
|
||||||
return lyrics
|
return lyrics
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
4.3.3
|
4.3.4
|
||||||
http://pan.nanfengling.cn/f/4Qc2/update.exe
|
http://pan.nanfengling.cn/f/4Qc2/update.exe
|
||||||
http://pan.nanfengling.cn/f/EVvid/NFLmusicv4.3.3.exe
|
http://pan.nanfengling.cn/f/ye5cZ/NFLmusicv4.3.4.exe
|
||||||
@ -1,5 +1,5 @@
|
|||||||
v4.3.3 - 2025.10.3
|
v4.3.4 - 2025.10.3
|
||||||
新增了聚合音乐搜索下载源
|
修复了聚合搜索下载的歌词无法被正常读取的问题
|
||||||
|
|
||||||
本产品是南凤科技旗下的音乐下载器
|
本产品是南凤科技旗下的音乐下载器
|
||||||
旨在提升用户体验,
|
旨在提升用户体验,
|
||||||
|
|||||||
Reference in New Issue
Block a user