mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-01 04:34:26 -04: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;
|
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;
|
return false;
|
||||||
|
@ -125,10 +125,6 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
|||||||
if (child.IsDirectory)
|
if (child.IsDirectory)
|
||||||
{
|
{
|
||||||
leftOver.Add(child);
|
leftOver.Add(child);
|
||||||
}
|
|
||||||
else if (IsIgnored(child.Name))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -298,22 +294,6 @@ namespace Emby.Server.Implementations.Library.Resolvers.Movies
|
|||||||
return item;
|
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>
|
/// <summary>
|
||||||
/// Sets the initial item values.
|
/// Sets the initial item values.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user