mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	Increment library number instead of appending
This commit is contained in:
		
							parent
							
								
									232a148d3f
								
							
						
					
					
						commit
						077f13ae4c
					
				@ -2890,11 +2890,12 @@ namespace Emby.Server.Implementations.Library
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
            var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
 | 
					            var rootFolderPath = _configurationManager.ApplicationPaths.DefaultUserViewsPath;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            var existingNameCount = 1; // first numbered name will be 2
 | 
				
			||||||
            var virtualFolderPath = Path.Combine(rootFolderPath, name);
 | 
					            var virtualFolderPath = Path.Combine(rootFolderPath, name);
 | 
				
			||||||
            while (Directory.Exists(virtualFolderPath))
 | 
					            while (Directory.Exists(virtualFolderPath))
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                name += "1";
 | 
					                existingNameCount++;
 | 
				
			||||||
                virtualFolderPath = Path.Combine(rootFolderPath, name);
 | 
					                virtualFolderPath = Path.Combine(rootFolderPath, name + " " + existingNameCount);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            var mediaPathInfos = options.PathInfos;
 | 
					            var mediaPathInfos = options.PathInfos;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user