Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add duration statistics to stats page #1626

Merged
merged 4 commits into from
Aug 26, 2021

Conversation

FleetingOrchard
Copy link
Contributor

@FleetingOrchard FleetingOrchard commented Aug 9, 2021

Adds a scene duration to the stats page (and shifts the stats around a bit so that everything still fits nicely). Here's a screenshot:

image

@WithoutPants
Copy link
Collaborator

I can see some benefit of adding total duration to the stats page, but not so much the query results. Adding yet another return value for Query is less than desirable. If I were to implement this, I'd probably refactor the Query method to accept some further options which would include whether or not to include the duration, and I'd change the return value to be a struct and error, rather than an object list, count and error. In any case, it would be a non-trivial change. On the query performance side, you really need to include a sum(duration) (as required) to the ids query. IMO it's not worth the effort involved just to return the total duration of the queried scenes - the benefit of which appears marginal at best. The query code needs to be refactored first.

@FleetingOrchard
Copy link
Contributor Author

Yeah, that's absolutely what I aimed for at first, I just couldn't get it there when I was putting the changeset together. It's mostly me just not groking Go quite yet.

The benefit of duration in query results, I've found, is mostly about just being aware of the volume of media one has. But it's also useful when using queries as queues/pseudo-playlists, which I see is getting some attention of the hotkey variety in another PR.

@FleetingOrchard
Copy link
Contributor Author

I've rolled this back to just the total scene duration on the stats page, given that's just a much, much more simple change. I'll probably come back to per-query duration at some point in a few months or whatever.

@FleetingOrchard FleetingOrchard changed the title [WIP, HELP!] Add duration statistics to stats page and scene pagination Add duration statistics to stats page Aug 18, 2021
@kermieisinthehouse
Copy link
Collaborator

Tested-by: kermie@isinthe.house

@kermieisinthehouse
Copy link
Collaborator

365-day years but 30-day months can make some weird stuff go on, but I think being a little off for 1% of a year isn't so bad, and the alternatives aren't great.

Screenshot_20210823-113759_1

@WithoutPants WithoutPants added this to the Version 0.9.0 milestone Aug 26, 2021
@WithoutPants WithoutPants added the improvement Something needed tweaking. label Aug 26, 2021
@WithoutPants WithoutPants merged commit 50cb6a9 into stashapp:develop Aug 26, 2021
@FleetingOrchard FleetingOrchard deleted the theGuiltPatch branch August 30, 2021 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Something needed tweaking.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants