-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
[guilib] Add Container.TotalWatched and Container.TotalUnwatched #7358
Conversation
ae1c4d8
to
d596cd7
Compare
@ronie thx for review. I updated the pr and also removed setting it for music items, because unwatched makes no sense there and always is empty. |
if (totalUnwatched > 0) | ||
return StringUtils::Format("%i", totalUnwatched); | ||
} | ||
} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
d596cd7
to
56d5b97
Compare
@Montellese Updated, thx. |
return StringUtils::Format("%i", playCount); | ||
} | ||
} | ||
break; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
56d5b97
to
35fdb13
Compare
@Montellese Updated, thx |
Wouldnt it be nicer to "merge" |
+1 for merging them since it's just the operand that differs here. |
59d2fc8
to
d9fd85d
Compare
That is much cleaner indeed, updated |
ec28940
to
f6eb672
Compare
@phil65 Had to do the if clause, as items.size()-playCount would also include the parent item (and any other item that has no playcount). |
You can use the same counter variable for both calls to save some code and make it more readable. |
f9c531b
to
68937e0
Compare
Using one counter variable now and also merged with totaltime. |
No problem. |
68937e0
to
0620474
Compare
I see no issue with merging besides it's a bit harder to follow. @Montellese objections? |
Will shove this on in on monday if there are no further objections. jenkins build this please |
0620474
to
74262ff
Compare
jenkins build this please |
[guilib] Add Container.TotalWatched and Container.TotalUnwatched
My original usecase for this was to be able to get the watched/unwatched count for the Home window widgets or playlist menu items, but since Home is not a media window, that doesn't work. Still these two infolabels can be useful in the library views.
For J****
@ronie @phil65