mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-07 03:48:06 +02:00
Merge pull request #4551 from crobibero/fix-name-cleaning
Only trim file name if folder name is shorter
This commit is contained in:
commit
02c1879533
1 changed files with 5 additions and 1 deletions
|
@ -227,7 +227,11 @@ namespace Emby.Naming.Video
|
||||||
testFilename = cleanName.ToString();
|
testFilename = cleanName.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (folderName.Length <= testFilename.Length)
|
||||||
|
{
|
||||||
testFilename = testFilename.Substring(folderName.Length).Trim();
|
testFilename = testFilename.Substring(folderName.Length).Trim();
|
||||||
|
}
|
||||||
|
|
||||||
return string.IsNullOrEmpty(testFilename)
|
return string.IsNullOrEmpty(testFilename)
|
||||||
|| testFilename[0].Equals('-')
|
|| testFilename[0].Equals('-')
|
||||||
|| testFilename[0].Equals('_')
|
|| testFilename[0].Equals('_')
|
||||||
|
|
Loading…
Reference in a new issue