mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-04 03:27:21 -05:00 
			
		
		
		
	Merge pull request #11526 from jellyfin/don't-assume-library-change-only-on-item-count
Use actual item removal count for library change determination
This commit is contained in:
		
						commit
						afd1d3be32
					
				@ -421,13 +421,12 @@ namespace MediaBrowser.Controller.Entities
 | 
			
		||||
                    validChildren.Add(child);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                // That's all the new and changed ones - now see if any have been removed and need cleanup
 | 
			
		||||
                var itemsRemoved = currentChildren.Values.Except(validChildren).ToList();
 | 
			
		||||
                var shouldRemove = !IsRoot || allowRemoveRoot;
 | 
			
		||||
                // If it's an AggregateFolder, don't remove
 | 
			
		||||
                if (shouldRemove && currentChildren.Count != validChildren.Count)
 | 
			
		||||
                if (shouldRemove && itemsRemoved.Count > 0)
 | 
			
		||||
                {
 | 
			
		||||
                    // That's all the new and changed ones - now see if there are any that are missing
 | 
			
		||||
                    var itemsRemoved = currentChildren.Values.Except(validChildren).ToList();
 | 
			
		||||
 | 
			
		||||
                    foreach (var item in itemsRemoved)
 | 
			
		||||
                    {
 | 
			
		||||
                        if (item.IsFileProtocol)
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user