Skip to content

Commit

Permalink
Merge pull request #36 from NicolaSmaniotto/master
Browse files Browse the repository at this point in the history
Ignore plays that happened before the item was added
  • Loading branch information
shemanaev authored Feb 4, 2024
2 parents 417b3b5 + 80c5109 commit 92c5ed8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MediaCleaner/ItemsAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ public IEnumerable<ExpiredItem> GetPlayedItems(
continue;
}

if (userData.LastPlayedDate < item.DateCreated)
{
_logger.LogWarning("Ignoring \"{Name}\" ({Id}): played by \"{Username}\" at {LastPlayedDate}, but added at {DateCreated}",
item.Name, item.Id, user.Username, userData.LastPlayedDate, item.DateCreated);
continue;
}

result.Add(new ExpiredItem
{
Item = item,
Expand Down

0 comments on commit 92c5ed8

Please sign in to comment.