mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-10-20 15:54:38 +00: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 = 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…
Add table
Add a link
Reference in a new issue