新增设置-下载设置-是否嵌入翻译歌词、罗马音歌词设置
This commit is contained in:
@@ -148,13 +148,18 @@ const saveMeta = (downloadInfo: LX.Download.ListItem) => {
|
||||
: Promise.resolve(null),
|
||||
]
|
||||
void Promise.all(tasks).then(([imgUrl, lyrics]) => {
|
||||
if (lyrics?.lyric) lyrics.lyric = fixKgLyric(lyrics.lyric)
|
||||
let lyric: null | string = null
|
||||
if (lyrics?.lyric) {
|
||||
lyric = fixKgLyric(lyrics.lyric)
|
||||
if (appSetting['download.isEmbedLyricT'] && lyrics.tlyric) lyric += '\n' + lyrics.tlyric + '\n'
|
||||
if (appSetting['download.isEmbedLyricR'] && lyrics.rlyric) lyric += '\n' + lyrics.rlyric + '\n'
|
||||
}
|
||||
void window.lx.worker.download.writeMeta(downloadInfo.metadata.filePath, {
|
||||
title: downloadInfo.metadata.musicInfo.name,
|
||||
artist: downloadInfo.metadata.musicInfo.singer,
|
||||
album: downloadInfo.metadata.musicInfo.meta.albumName,
|
||||
APIC: imgUrl,
|
||||
lyrics: lyrics?.lyric ?? null,
|
||||
lyrics: lyric,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -31,6 +31,10 @@ dd
|
||||
base-checkbox(id="setting_download_isEmbedPic" :modelValue="appSetting['download.isEmbedPic']" @update:modelValue="updateSetting({'download.isEmbedPic': $event})" :label="$t('setting__download_embed_pic')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isEmbedLyric" :modelValue="appSetting['download.isEmbedLyric']" @update:modelValue="updateSetting({'download.isEmbedLyric': $event})" :label="$t('setting__download_embed_lyric')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isEmbedLyricT" :disabled="!appSetting['download.isEmbedLyric']" :modelValue="appSetting['download.isEmbedLyricT']" @update:modelValue="updateSetting({'download.isEmbedLyricT': $event})" :label="$t('setting__download_embed_tlyric')")
|
||||
.gap-top
|
||||
base-checkbox(id="setting_download_isEmbedLyricR" :disabled="!appSetting['download.isEmbedLyric']" :modelValue="appSetting['download.isEmbedLyricR']" @update:modelValue="updateSetting({'download.isEmbedLyricR': $event})" :label="$t('setting__download_embed_rlyric')")
|
||||
dd(:aria-label="$t('setting__download_lyric_title')")
|
||||
h3#download_lyric {{$t('setting__download_lyric')}}
|
||||
.gap-top
|
||||
|
||||
Reference in New Issue
Block a user