mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: 修复错误排除空格的问题
This commit is contained in:
parent
18da75b87a
commit
9962676498
@ -419,7 +419,7 @@ export class songRequest extends plugin {
|
|||||||
// 获取文件名
|
// 获取文件名
|
||||||
const fileName = cleanPath.split('/').pop().replace(/\.\w+$/, '');
|
const fileName = cleanPath.split('/').pop().replace(/\.\w+$/, '');
|
||||||
logger.info(fileName)
|
logger.info(fileName)
|
||||||
const parts = fileName.trim().match(/^\s*([\u4e00-\u9fa5a-zA-Z0-9]+)\s*-\s*([\u4e00-\u9fa5a-zA-Z0-9]+)\s*$/);
|
const parts = fileName.trim().match(/^([\s\S]+)\s*-\s*([\s\S]+)$/);
|
||||||
logger.info(parts)
|
logger.info(parts)
|
||||||
const newFileName = dirPath + '/' + parts[2].trim() + extension
|
const newFileName = dirPath + '/' + parts[2].trim() + extension
|
||||||
// 进行元数据编辑
|
// 进行元数据编辑
|
||||||
|
Loading…
x
Reference in New Issue
Block a user