removed IsRecentlyPlayed option and fixed FileTime warnings
This commit is contained in:
parent
dbf6081a9b
commit
ad0ec70433
|
@ -339,9 +339,6 @@ namespace MediaBrowser.Api.UserLibrary
|
|||
return userdata != null && userdata.PlayCount > 0;
|
||||
});
|
||||
|
||||
case ItemFilter.IsRecentlyPlayed:
|
||||
return items.Where(item => item.IsRecentlyPlayed(user));
|
||||
|
||||
case ItemFilter.IsUnplayed:
|
||||
return items.Where(item =>
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -19,8 +19,9 @@
|
|||
**************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using FILETIME = System.Runtime.InteropServices.ComTypes.FILETIME;
|
||||
|
||||
namespace MediaBrowser.Installer.Code
|
||||
{
|
||||
|
@ -47,7 +48,7 @@ namespace MediaBrowser.Installer.Code
|
|||
SLGP_RAWPATH = 0x4
|
||||
}
|
||||
|
||||
[StructLayoutAttribute(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
|
||||
[StructLayout(LayoutKind.Sequential, CharSet=CharSet.Ansi)]
|
||||
public struct WIN32_FIND_DATAA
|
||||
{
|
||||
public int dwFileAttributes;
|
||||
|
|
|
@ -224,13 +224,6 @@ namespace MediaBrowser.Model.Configuration
|
|||
[ProtoMember(34)]
|
||||
public int RecentItemDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the recently played days.
|
||||
/// </summary>
|
||||
/// <value>The recently played days.</value>
|
||||
[ProtoMember(35)]
|
||||
public int RecentlyPlayedDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the minimum percentage of an item that must be played in order for playstate to be updated.
|
||||
/// </summary>
|
||||
|
@ -291,7 +284,6 @@ namespace MediaBrowser.Model.Configuration
|
|||
FileWatcherDelay = 8;
|
||||
|
||||
RecentItemDays = 14;
|
||||
RecentlyPlayedDays = 14;
|
||||
|
||||
EnableInternetProviders = true; //initial installs will need these
|
||||
InternetProviderExcludeTypes = new string[] { };
|
||||
|
|
|
@ -33,10 +33,6 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <summary>
|
||||
/// The item is resumable
|
||||
/// </summary>
|
||||
IsResumable = 7,
|
||||
/// <summary>
|
||||
/// The item is recently played
|
||||
/// </summary>
|
||||
IsRecentlyPlayed = 8
|
||||
IsResumable = 7
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user