aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/NetUtils.cpp3
-rw-r--r--src/plugins/Youtube.cpp7
2 files changed, 4 insertions, 6 deletions
diff --git a/src/NetUtils.cpp b/src/NetUtils.cpp
index 977bbbf..d6b6cf2 100644
--- a/src/NetUtils.cpp
+++ b/src/NetUtils.cpp
@@ -110,6 +110,9 @@ namespace QuickMedia {
} else {
i += 1;
}
+ } else if(c == '+') {
+ result += ' ';
+ i += 1;
} else {
result += c;
i += 1;
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 11ff7fa..2be4f8d 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -2064,8 +2064,6 @@ R"END(
return (hours * 60 * 60) + (minutes * 60) + seconds;
if(sscanf(timestamp, "%d:%d", &minutes, &seconds) == 2)
return (minutes * 60) + seconds;
- if(sscanf(timestamp, "%d", &seconds) == 1)
- return seconds;
return -1;
}
@@ -2147,10 +2145,8 @@ R"END(
const Json::Value &video_details_json = json_root["videoDetails"];
if(video_details_json.isObject()) {
const Json::Value &title_json = video_details_json["title"];
- if(title_json.isString()) {
+ if(title_json.isString())
title = title_json.asString();
- string_replace_all(title, '+', ' ');
- }
const Json::Value &channel_id_json = video_details_json["channelId"];
if(channel_id_json.isString())
@@ -2159,7 +2155,6 @@ R"END(
const Json::Value &description_json = video_details_json["shortDescription"];
if(description_json.isString()) {
std::string description = description_json.asString();
- string_replace_all(description, '+', ' ');
chapters = youtube_description_extract_chapters(description);
}
}