diff --git a/src/features/file-listing/FileRow.tsx b/src/features/file-listing/FileRow.tsx index 9dd68b0..b08f8c1 100644 --- a/src/features/file-listing/FileRow.tsx +++ b/src/features/file-listing/FileRow.tsx @@ -24,7 +24,8 @@ interface FileRowProps { export function FileRow({ id, file }: FileRowProps) { const isDecrypted = file.state === ProcessState.COMPLETE; - const decryptedName = file.fileName.replace(/\.[a-z\d]{3,6}$/, '') + '.' + file.ext; + const nameWithoutExt = file.fileName.replace(/\.[a-z\d]{3,6}$/, ''); + const decryptedName = nameWithoutExt + '.' + file.ext; const audioPlayerRef = useRef(null); const togglePlay = () => { @@ -44,23 +45,37 @@ export function FileRow({ id, file }: FileRowProps) { -
+
{file.metadata.cover && } {!file.metadata.cover && 暂无封面}
- - {file.metadata.name || file.fileName} + + {file.metadata.name || nameWithoutExt}