feat: track watch time from playback events
Daily per-user aggregates, counted on the server clock between progress reports. Includes the cleanup task for rows past 90 days.
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Jellyfin.Plugin.Herald.Stats;
|
||||
|
||||
/// <summary>
|
||||
/// An amount of watch time to add to one user's daily aggregate.
|
||||
/// </summary>
|
||||
/// <param name="UserId">The user id.</param>
|
||||
/// <param name="Date">The server-local day the time belongs to.</param>
|
||||
/// <param name="Seconds">Watched seconds to add.</param>
|
||||
/// <param name="Plays">Started plays to add.</param>
|
||||
/// <param name="Activity">When the activity happened (UTC).</param>
|
||||
public record WatchIncrement(Guid UserId, DateOnly Date, double Seconds, int Plays, DateTime Activity);
|
||||
Reference in New Issue
Block a user