aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dlna/SearchCriteria.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Model/Dlna/SearchCriteria.cs')
-rw-r--r--MediaBrowser.Model/Dlna/SearchCriteria.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/MediaBrowser.Model/Dlna/SearchCriteria.cs b/MediaBrowser.Model/Dlna/SearchCriteria.cs
index 533605d89..4f47c2821 100644
--- a/MediaBrowser.Model/Dlna/SearchCriteria.cs
+++ b/MediaBrowser.Model/Dlna/SearchCriteria.cs
@@ -1,6 +1,6 @@
-using MediaBrowser.Model.Extensions;
using System;
using System.Text.RegularExpressions;
+using MediaBrowser.Model.Extensions;
namespace MediaBrowser.Model.Dlna
{
@@ -15,7 +15,7 @@ namespace MediaBrowser.Model.Dlna
/// <param name="term">The term.</param>
/// <param name="limit">The limit.</param>
/// <returns>System.String[].</returns>
- private string[] RegexSplit(string str, string term, int limit)
+ private static string[] RegexSplit(string str, string term, int limit)
{
return new Regex(term).Split(str, limit);
}
@@ -26,7 +26,7 @@ namespace MediaBrowser.Model.Dlna
/// <param name="str">The string.</param>
/// <param name="term">The term.</param>
/// <returns>System.String[].</returns>
- private string[] RegexSplit(string str, string term)
+ private static string[] RegexSplit(string str, string term)
{
return Regex.Split(str, term, RegexOptions.IgnoreCase);
}
@@ -35,20 +35,20 @@ namespace MediaBrowser.Model.Dlna
{
if (string.IsNullOrEmpty(search))
{
- throw new ArgumentNullException("search");
+ throw new ArgumentNullException(nameof(search));
}
SearchType = SearchType.Unknown;
- String[] factors = RegexSplit(search, "(and|or)");
- foreach (String factor in factors)
+ string[] factors = RegexSplit(search, "(and|or)");
+ foreach (string factor in factors)
{
- String[] subFactors = RegexSplit(factor.Trim().Trim('(').Trim(')').Trim(), "\\s", 3);
+ string[] subFactors = RegexSplit(factor.Trim().Trim('(').Trim(')').Trim(), "\\s", 3);
if (subFactors.Length == 3)
{
- if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) &&
+ if (StringHelper.EqualsIgnoreCase("upnp:class", subFactors[0]) &&
(StringHelper.EqualsIgnoreCase("=", subFactors[1]) || StringHelper.EqualsIgnoreCase("derivedfrom", subFactors[1])))
{
if (StringHelper.EqualsIgnoreCase("\"object.item.imageItem\"", subFactors[2]) || StringHelper.EqualsIgnoreCase("\"object.item.imageItem.photo\"", subFactors[2]))