修复本地歌曲同名歌词文件调整偏移时间后,下次再播放时调整的设置未被应用的问题(#2139)
parent
08da7a37e6
commit
63b2c2fb2f
|
@ -27,6 +27,7 @@ Linux 系统至少需要 GLIBC_2.29 版本才能运行,
|
||||||
- 修复获取自定义环境音效预设列表逻辑问题
|
- 修复获取自定义环境音效预设列表逻辑问题
|
||||||
- 修复 m4a 文件歌曲内嵌歌词无法读取的问题(#2090)
|
- 修复 m4a 文件歌曲内嵌歌词无法读取的问题(#2090)
|
||||||
- 修复 windows 任务管理器中的进程名显示为描述的问题(#2147)
|
- 修复 windows 任务管理器中的进程名显示为描述的问题(#2147)
|
||||||
|
- 修复本地歌曲同名歌词文件调整偏移时间后,下次再播放时调整的设置未被应用的问题(#2139)
|
||||||
|
|
||||||
### 变更
|
### 变更
|
||||||
|
|
||||||
|
|
|
@ -137,7 +137,8 @@ export const getLyricInfo = async({ musicInfo, isRefresh, onToggleSource = () =>
|
||||||
}): Promise<LX.Player.LyricInfo> => {
|
}): Promise<LX.Player.LyricInfo> => {
|
||||||
if (!isRefresh) {
|
if (!isRefresh) {
|
||||||
const [lyricInfo, fileLyricInfo] = await Promise.all([getCachedLyricInfo(musicInfo), window.lx.worker.main.getMusicFileLyric(musicInfo.meta.filePath)])
|
const [lyricInfo, fileLyricInfo] = await Promise.all([getCachedLyricInfo(musicInfo), window.lx.worker.main.getMusicFileLyric(musicInfo.meta.filePath)])
|
||||||
if (lyricInfo?.lyric && lyricInfo.lyric != lyricInfo.rawlrcInfo.lyric) {
|
// console.log(lyricInfo, fileLyricInfo)
|
||||||
|
if (lyricInfo?.lyric && lyricInfo.lyric != fileLyricInfo?.lyric) {
|
||||||
// 存在已编辑歌词
|
// 存在已编辑歌词
|
||||||
return buildLyricInfo({ ...lyricInfo, rawlrcInfo: fileLyricInfo ?? lyricInfo.rawlrcInfo })
|
return buildLyricInfo({ ...lyricInfo, rawlrcInfo: fileLyricInfo ?? lyricInfo.rawlrcInfo })
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,7 +125,8 @@ export const buildLyricInfo = async(lyricInfo: MakeOptional<LX.Player.LyricInfo,
|
||||||
export const getCachedLyricInfo = async(musicInfo: LX.Music.MusicInfo): Promise<LX.Player.LyricInfo | null> => {
|
export const getCachedLyricInfo = async(musicInfo: LX.Music.MusicInfo): Promise<LX.Player.LyricInfo | null> => {
|
||||||
let lrcInfo = await getStoreLyric(musicInfo)
|
let lrcInfo = await getStoreLyric(musicInfo)
|
||||||
// lrcInfo = {} as unknown as LX.Player.LyricInfo
|
// lrcInfo = {} as unknown as LX.Player.LyricInfo
|
||||||
if (existTimeExp.test(lrcInfo.lyric) && lrcInfo.tlyric != null) {
|
if (existTimeExp.test(lrcInfo.lyric)) {
|
||||||
|
if (lrcInfo.tlyric != null) {
|
||||||
// if (musicInfo.lrc.startsWith('\ufeff[id:$00000000]')) {
|
// if (musicInfo.lrc.startsWith('\ufeff[id:$00000000]')) {
|
||||||
// let str = musicInfo.lrc.replace('\ufeff[id:$00000000]\n', '')
|
// let str = musicInfo.lrc.replace('\ufeff[id:$00000000]\n', '')
|
||||||
// commit('setLrc', { musicInfo, lyric: str, tlyric: musicInfo.tlrc, lxlyric: musicInfo.tlrc })
|
// commit('setLrc', { musicInfo, lyric: str, tlyric: musicInfo.tlrc, lxlyric: musicInfo.tlrc })
|
||||||
|
@ -150,6 +151,8 @@ export const getCachedLyricInfo = async(musicInfo: LX.Music.MusicInfo): Promise<
|
||||||
if (!['wy', 'kg', 'tx'].includes(musicInfo.source)) return lrcInfo
|
if (!['wy', 'kg', 'tx'].includes(musicInfo.source)) return lrcInfo
|
||||||
} else return lrcInfo
|
} else return lrcInfo
|
||||||
}
|
}
|
||||||
|
if (musicInfo.source == 'local') return lrcInfo
|
||||||
|
}
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue