aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Entities/IHasProviderIds.cs
diff options
context:
space:
mode:
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>