mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 05:47:14 -04:00
Update name so media paths store to correct library
This commit is contained in:
parent
ca67a48140
commit
784ed796ce
@ -2840,10 +2840,12 @@ namespace Emby.Server.Implementations.Library
|
|||||||
|
|
||||||
var existingNameCount = 1; // first numbered name will be 2
|
var existingNameCount = 1; // first numbered name will be 2
|
||||||
var virtualFolderPath = Path.Combine(rootFolderPath, name);
|
var virtualFolderPath = Path.Combine(rootFolderPath, name);
|
||||||
|
var originalName = name;
|
||||||
while (Directory.Exists(virtualFolderPath))
|
while (Directory.Exists(virtualFolderPath))
|
||||||
{
|
{
|
||||||
existingNameCount++;
|
existingNameCount++;
|
||||||
virtualFolderPath = Path.Combine(rootFolderPath, name + " " + existingNameCount);
|
name = originalName + existingNameCount;
|
||||||
|
virtualFolderPath = Path.Combine(rootFolderPath, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
var mediaPathInfos = options.PathInfos;
|
var mediaPathInfos = options.PathInfos;
|
||||||
|
Loading…
Reference in New Issue
Block a user