Merge pull request #4551 from crobibero/fix-name-cleaning

Only trim file name if folder name is shorter
This commit is contained in:
dkanada 2020-11-23 22:34:17 +09:00 committed by GitHub
commit 02c1879533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -227,7 +227,11 @@ namespace Emby.Naming.Video
testFilename = cleanName.ToString();
}
if (folderName.Length <= testFilename.Length)
{
testFilename = testFilename.Substring(folderName.Length).Trim();
}
return string.IsNullOrEmpty(testFilename)
|| testFilename[0].Equals('-')
|| testFilename[0].Equals('_')