mark games played when played through nesbox

This commit is contained in:
Luke Pulverenti
2013-10-28 10:56:57 -04:00
parent b8f642a2d4
commit 8bd7df410c
8 changed files with 176 additions and 56 deletions

View File

@@ -1337,6 +1337,13 @@ namespace MediaBrowser.Controller.Entities
var data = userManager.GetUserData(user.Id, key);
if (datePlayed.HasValue)
{
// Incremenet
data.PlayCount++;
}
// Ensure it's at least one
data.PlayCount = Math.Max(data.PlayCount, 1);
data.LastPlayedDate = datePlayed ?? data.LastPlayedDate;