aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-09-27 23:51:59 +0200
committerdec05eba <dec05eba@protonmail.com>2023-09-27 23:51:59 +0200
commiteaa29234870703ada1b63a357d9d9d0fdaea653f (patch)
treeec2970bb241922c5ca29a2a567b9757a2f31cf35
parentac01d918e5cfda3dd202b641cd38a7f554e5ae52 (diff)
Comma separate invidious feed views
-rw-r--r--src/plugins/Youtube.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 474d3a2..7248348 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -971,8 +971,10 @@ namespace QuickMedia {
std::string video_id_str = video_id_json.asString();
auto body_item = BodyItem::create(title_json.asString());
std::string desc;
- if(view_count_json.isInt64())
- desc += std::to_string(view_count_json.asInt64()) + " view" + (view_count_json.asInt64() == 1 ? "" : "s");
+ if(view_count_json.isInt64()) {
+ std::string views = number_separate_thousand_commas(std::to_string(view_count_json.asInt64()));
+ desc += views + " view" + (view_count_json.asInt64() == 1 ? "" : "s");
+ }
if(published_text_json.isString()) {
if(!desc.empty())
desc += " • ";