aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Common/Extensions/BaseExtensions.cs
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-16 16:13:45 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2013-08-16 16:13:45 -0400
commit1df5839eb06542c4190868741e214720051ef530 (patch)
treec838f57b1e852dd2faf83ee037c6ac25183f6d45 /MediaBrowser.Common/Extensions/BaseExtensions.cs
parenta78ed5c61fef8506b85c5c8c4e2ed6972b3397f7 (diff)
factor mixed folder value into item id
Diffstat (limited to 'MediaBrowser.Common/Extensions/BaseExtensions.cs')
-rw-r--r--MediaBrowser.Common/Extensions/BaseExtensions.cs33
1 files changed, 26 insertions, 7 deletions
diff --git a/MediaBrowser.Common/Extensions/BaseExtensions.cs b/MediaBrowser.Common/Extensions/BaseExtensions.cs
index 4e2a475d9..0b63d7b31 100644
--- a/MediaBrowser.Common/Extensions/BaseExtensions.cs
+++ b/MediaBrowser.Common/Extensions/BaseExtensions.cs
@@ -40,17 +40,36 @@ namespace MediaBrowser.Common.Extensions
/// Gets the MB id.
/// </summary>
/// <param name="str">The STR.</param>
- /// <param name="aType">A type.</param>
+ /// <param name="type">The type.</param>
/// <returns>Guid.</returns>
- /// <exception cref="System.ArgumentNullException">aType</exception>
- public static Guid GetMBId(this string str, Type aType)
+ public static Guid GetMBId(this string str, Type type)
{
- if (aType == null)
+ return str.GetMBId(type, false);
+ }
+
+ /// <summary>
+ /// Gets the MB id.
+ /// </summary>
+ /// <param name="str">The STR.</param>
+ /// <param name="type">The type.</param>
+ /// <param name="isInMixedFolder">if set to <c>true</c> [is in mixed folder].</param>
+ /// <returns>Guid.</returns>
+ /// <exception cref="System.ArgumentNullException">type</exception>
+ public static Guid GetMBId(this string str, Type type, bool isInMixedFolder)
+ {
+ if (type == null)
{
- throw new ArgumentNullException("aType");
+ throw new ArgumentNullException("type");
}
-
- return (aType.FullName + str.ToLower()).GetMD5();
+
+ var key = type.FullName + str.ToLower();
+
+ if (isInMixedFolder)
+ {
+ key += "InMixedFolder";
+ }
+
+ return key.GetMD5();
}
/// <summary>