mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-11-15 18:08:53 -07: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
@ -227,7 +227,11 @@ namespace Emby.Naming.Video
|
||||
testFilename = cleanName.ToString();
|
||||
}
|
||||
|
||||
testFilename = testFilename.Substring(folderName.Length).Trim();
|
||||
if (folderName.Length <= testFilename.Length)
|
||||
{
|
||||
testFilename = testFilename.Substring(folderName.Length).Trim();
|
||||
}
|
||||
|
||||
return string.IsNullOrEmpty(testFilename)
|
||||
|| testFilename[0].Equals('-')
|
||||
|| testFilename[0].Equals('_')
|
||||
|
Loading…
Reference in New Issue
Block a user