mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-12 18:50:23 +01:00
removed IsRecentlyPlayed option and fixed FileTime warnings
This commit is contained in:
@@ -1004,29 +1004,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
return (DateTime.UtcNow - DateCreated).TotalDays < ConfigurationManager.Configuration.RecentItemDays;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines if the item is considered recently played on user settings
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns><c>true</c> if [is recently played] [the specified user]; otherwise, <c>false</c>.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
public bool IsRecentlyPlayed(User user)
|
||||
{
|
||||
if (user == null)
|
||||
{
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
|
||||
var data = GetUserData(user, false);
|
||||
|
||||
if (data == null || data.LastPlayedDate == null || data.PlayCount == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return (DateTime.UtcNow - data.LastPlayedDate.Value).TotalDays < ConfigurationManager.Configuration.RecentlyPlayedDays;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds people to the item
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user