aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/IHasProviderIds.cs
diff options
context:
space:
mode:
authorEric Reed <ebr@mediabrowser3.com>2014-01-29 12:22:53 -0500
committerEric Reed <ebr@mediabrowser3.com>2014-01-29 12:22:53 -0500
commitab5145bcd794ee579e0064c9c0f9d15b13f72fb4 (patch)
treed68cdabe4302cc4dda8194ee840060f48d9fa714 /MediaBrowser.Model/Entities/IHasProviderIds.cs
parent1f31c8dbfca9ca9134d9ee779256c435f913689b (diff)
parentc0f606683a045e463f518ec466b9fc9a85f8d4fd (diff)
Merge branch 'master' of https://github.com/MediaBrowser/MediaBrowser
Diffstat (limited to 'MediaBrowser.Model/Entities/IHasProviderIds.cs')
-rw-r--r--MediaBrowser.Model/Entities/IHasProviderIds.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/MediaBrowser.Model/Entities/IHasProviderIds.cs b/MediaBrowser.Model/Entities/IHasProviderIds.cs
index 1c54455da..efb75412f 100644
--- a/MediaBrowser.Model/Entities/IHasProviderIds.cs
+++ b/MediaBrowser.Model/Entities/IHasProviderIds.cs
@@ -21,6 +21,17 @@ namespace MediaBrowser.Model.Entities
public static class ProviderIdsExtensions
{
/// <summary>
+ /// Determines whether [has provider identifier] [the specified instance].
+ /// </summary>
+ /// <param name="instance">The instance.</param>
+ /// <param name="provider">The provider.</param>
+ /// <returns><c>true</c> if [has provider identifier] [the specified instance]; otherwise, <c>false</c>.</returns>
+ public static bool HasProviderId(this IHasProviderIds instance, MetadataProviders provider)
+ {
+ return !string.IsNullOrEmpty(instance.GetProviderId(provider.ToString()));
+ }
+
+ /// <summary>
/// Gets a provider id
/// </summary>
/// <param name="instance">The instance.</param>