播放本地歌曲时,将优先尝试读取本地同名字的 jpg 或 png 图片作为播放封面显示

This commit is contained in:
lyswhut
2024-10-28 23:04:48 +08:00
parent 68ac1b7641
commit 9237dbbc18
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@ const getTempDir = async() => {
export const getMusicFilePic = async(filePath: string) => {
const picture = await getLocalMusicFilePic(filePath)
if (!picture) return ''
if (typeof picture == 'string') return picture
if (picture.data.length > 400_000) {
try {
const tempDir = await getTempDir()