-
-
Notifications
You must be signed in to change notification settings - Fork 801
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
Conversation
pkg/models/querybuilder_scene.go
Outdated
func (qb *SceneQueryBuilder) SizeCount() (string, error) { | ||
sum, err := runSumQuery("SELECT SUM(size) as sum FROM scenes", nil) | ||
if err != nil { | ||
return "O", err |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this 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.
Add the library size ( sum of the sizes of all scenes ) to the stats page.
closes #426