aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index c887f6977..0fc4f10f1 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -167,6 +167,7 @@ namespace MediaBrowser.Controller.Entities
public static ILocalizationManager LocalizationManager { get; set; }
public static IItemRepository ItemRepository { get; set; }
public static IFileSystem FileSystem { get; set; }
+ public static IUserDataManager UserDataManager { get; set; }
/// <summary>
/// Returns a <see cref="System.String" /> that represents this instance.
@@ -1705,5 +1706,12 @@ namespace MediaBrowser.Controller.Entities
// Directory watchers should repeat this, but do a quick refresh first
return RefreshMetadata(CancellationToken.None, forceSave: true, allowSlowProviders: false);
}
+
+ public virtual bool IsPlayed(User user)
+ {
+ var userdata = UserDataManager.GetUserData(user.Id, GetUserDataKey());
+
+ return userdata != null && userdata.Played;
+ }
}
}