@ -71,6 +71,7 @@ namespace NzbDrone.Core.MediaFiles
private static readonly Regex ExcludedExtrasSubFolderRegex = new Regex ( @"(?:\\|\/|^)(?:extras|extrafanart|behind the scenes|deleted scenes|featurettes|interviews|scenes|samples|shorts|trailers)(?:\\|\/)" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
private static readonly Regex ExcludedSubFoldersRegex = new Regex ( @"(?:\\|\/|^)(?:@eadir|\.@__thumb|plex versions|\.[^\\/]+)(?:\\|\/)" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
private static readonly Regex ExcludedExtraFilesRegex = new Regex ( @"(-(trailer|other|behindthescenes|deleted|featurette|interview|scene|short)\.[^.]+$)" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
private static readonly Regex ExcludedFilesRegex = new Regex ( @"^\._|^Thumbs\.db$" , RegexOptions . Compiled | RegexOptions . IgnoreCase ) ;
public void Scan ( Series series )
@ -226,7 +227,9 @@ namespace NzbDrone.Core.MediaFiles
if ( filterExtras )
{
filteredPaths = filteredPaths . Where ( path = > ! ExcludedExtrasSubFolderRegex . IsMatch ( basePath . GetRelativePath ( path ) ) ) . ToList ( ) ;
filteredPaths = filteredPaths . Where ( path = > ! ExcludedExtrasSubFolderRegex . IsMatch ( basePath . GetRelativePath ( path ) ) )
. Where ( path = > ! ExcludedExtraFilesRegex . IsMatch ( Path . GetFileName ( path ) ) )
. ToList ( ) ;
}
return filteredPaths ;