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 library size to main stats page #427

Merged
merged 5 commits into from
Apr 3, 2020
Merged

Conversation

bnkai
Copy link
Collaborator

@bnkai bnkai commented Mar 27, 2020

Add the library size ( sum of the sizes of all scenes ) to the stats page.

closes #426

@bnkai bnkai added the improvement Something needed tweaking. label Mar 28, 2020
func (qb *SceneQueryBuilder) SizeCount() (string, error) {
sum, err := runSumQuery("SELECT SUM(size) as sum FROM scenes", nil)
if err != nil {
return "O", err
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, what's the purpose of returning O? Can you not return an empty string?

Copy link
Collaborator Author

@bnkai bnkai Mar 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"0" seemed better than an empty string since we are talking about size. But doesn't actually matter , do you think "" would look better?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have a preference since it's an error anyway, I was just curious since it returns the letter O. 0 makes more sense.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh it was supposed to be "0" (zero) ! Just noticed that now , typo...

Copy link
Collaborator

@WithoutPants WithoutPants left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks and tests ok.

@WithoutPants WithoutPants merged commit e58c311 into stashapp:develop Apr 3, 2020
@WithoutPants WithoutPants added this to the Version 0.2.0 milestone Apr 3, 2020
Anon247 pushed a commit to Anon247/stash that referenced this pull request Apr 11, 2020
Tweeticoats pushed a commit to Tweeticoats/stash that referenced this pull request Feb 1, 2021
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.

[Feature] Total Library File Size
2 participants