mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Track watch activity for scenes. (#3055)
* track watchtime and view time * add view count sorting, added continue position filter * display metrics in file info * add toggle for tracking activity * save activity every 10 seconds * reset resume when video is nearly complete * start from beginning when playing scene in queue Co-authored-by: WithoutPants <53250216+WithoutPants@users.noreply.github.com>
This commit is contained in:
@@ -199,6 +199,18 @@ func NewOptionalFloat64(v float64) OptionalFloat64 {
|
||||
return OptionalFloat64{v, false, true}
|
||||
}
|
||||
|
||||
// NewOptionalFloat64 returns a new OptionalFloat64 with the given value.
|
||||
func NewOptionalFloat64Ptr(v *float64) OptionalFloat64 {
|
||||
if v == nil {
|
||||
return OptionalFloat64{
|
||||
Null: true,
|
||||
Set: true,
|
||||
}
|
||||
}
|
||||
|
||||
return OptionalFloat64{*v, false, true}
|
||||
}
|
||||
|
||||
// OptionalDate represents an optional date argument that may be null. See OptionalString.
|
||||
type OptionalDate struct {
|
||||
Value Date
|
||||
|
||||
Reference in New Issue
Block a user