mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	update rules for samples
This commit is contained in:
		
							parent
							
								
									808f2f3095
								
							
						
					
					
						commit
						d06532c602
					
				@ -141,17 +141,6 @@ namespace Emby.Server.Implementations.Library
 | 
			
		||||
                        return true;
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                // Ignore samples
 | 
			
		||||
                var sampleFilename = " " + filename.Replace(".", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                    .Replace("-", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                    .Replace("_", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                    .Replace("!", " ", StringComparison.OrdinalIgnoreCase);
 | 
			
		||||
 | 
			
		||||
                if (sampleFilename.IndexOf(" sample ", StringComparison.OrdinalIgnoreCase) != -1)
 | 
			
		||||
                {
 | 
			
		||||
                    return true;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return false;
 | 
			
		||||
 | 
			
		||||
@ -125,10 +125,6 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
 | 
			
		||||
                if (child.IsDirectory)
 | 
			
		||||
                {
 | 
			
		||||
                    leftOver.Add(child);
 | 
			
		||||
                }
 | 
			
		||||
                else if (IsIgnored(child.Name))
 | 
			
		||||
                {
 | 
			
		||||
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
@ -298,22 +294,6 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
 | 
			
		||||
            return item;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private bool IsIgnored(string filename)
 | 
			
		||||
        {
 | 
			
		||||
            // Ignore samples
 | 
			
		||||
            var sampleFilename = " " + filename.Replace(".", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                .Replace("-", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                .Replace("_", " ", StringComparison.OrdinalIgnoreCase)
 | 
			
		||||
                .Replace("!", " ", StringComparison.OrdinalIgnoreCase);
 | 
			
		||||
 | 
			
		||||
            if (sampleFilename.IndexOf(" sample ", StringComparison.OrdinalIgnoreCase) != -1)
 | 
			
		||||
            {
 | 
			
		||||
                return true;
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            return false;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// Sets the initial item values.
 | 
			
		||||
        /// </summary>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user