mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
* 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>
18 lines
274 B
TypeScript
18 lines
274 B
TypeScript
const numberToString = (seconds: number) => {
|
|
return seconds + "%";
|
|
};
|
|
|
|
const stringToNumber = (v?: string) => {
|
|
if (!v) {
|
|
return 0;
|
|
}
|
|
|
|
const numStr = v.replace("%", "");
|
|
return parseInt(numStr, 10);
|
|
};
|
|
|
|
export default {
|
|
numberToString,
|
|
stringToNumber,
|
|
};
|