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:
@@ -1,7 +1,11 @@
|
||||
import React from "react";
|
||||
import { Button, Form } from "react-bootstrap";
|
||||
import { FormattedMessage, useIntl } from "react-intl";
|
||||
import { DurationInput, LoadingIndicator } from "src/components/Shared";
|
||||
import {
|
||||
DurationInput,
|
||||
PercentInput,
|
||||
LoadingIndicator,
|
||||
} from "src/components/Shared";
|
||||
import { CheckboxGroup } from "./CheckboxGroup";
|
||||
import { SettingSection } from "../SettingSection";
|
||||
import {
|
||||
@@ -243,6 +247,41 @@ export const SettingsInterfacePanel: React.FC = () => {
|
||||
checked={iface.showScrubber ?? undefined}
|
||||
onChange={(v) => saveInterface({ showScrubber: v })}
|
||||
/>
|
||||
<BooleanSetting
|
||||
id="always-start-from-beginning"
|
||||
headingID="config.ui.scene_player.options.always_start_from_beginning"
|
||||
checked={ui.alwaysStartFromBeginning ?? undefined}
|
||||
onChange={(v) => saveUI({ alwaysStartFromBeginning: v })}
|
||||
/>
|
||||
<BooleanSetting
|
||||
id="track-activity"
|
||||
headingID="config.ui.scene_player.options.track_activity"
|
||||
checked={ui.trackActivity ?? undefined}
|
||||
onChange={(v) => saveUI({ trackActivity: v })}
|
||||
/>
|
||||
<ModalSetting<number>
|
||||
id="ignore-interval"
|
||||
headingID="config.ui.minimum_play_percent.heading"
|
||||
subHeadingID="config.ui.minimum_play_percent.description"
|
||||
value={ui.minimumPlayPercent ?? 0}
|
||||
onChange={(v) => saveUI({ minimumPlayPercent: v })}
|
||||
disabled={!ui.trackActivity}
|
||||
renderField={(value, setValue) => (
|
||||
<PercentInput
|
||||
numericValue={value}
|
||||
onValueChange={(interval) => setValue(interval ?? 0)}
|
||||
/>
|
||||
)}
|
||||
renderValue={(v) => {
|
||||
return <span>{v}%</span>;
|
||||
}}
|
||||
/>
|
||||
<NumberSetting
|
||||
headingID="config.ui.slideshow_delay.heading"
|
||||
subHeadingID="config.ui.slideshow_delay.description"
|
||||
value={iface.imageLightbox?.slideshowDelay ?? undefined}
|
||||
onChange={(v) => saveLightboxSettings({ slideshowDelay: v })}
|
||||
/>
|
||||
<BooleanSetting
|
||||
id="auto-start-video"
|
||||
headingID="config.ui.scene_player.options.auto_start_video"
|
||||
|
||||
Reference in New Issue
Block a user