aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-11 06:52:04 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-11 06:52:04 +0200
commit8ad3f9ab8cc7029eb5db937e229d2a37b51a3462 (patch)
tree3b6592c16a6986aba818522c532768983a959388 /src/plugins
parent6443ce7df2d690c5a03dc68cb6866f5d7d4e3fba (diff)
Readd youtube video title
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Youtube.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 04c29e0..d891ae3 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -1857,7 +1857,7 @@ namespace QuickMedia {
return audio_formats.front().base.url;
}
- PluginResult YoutubeVideoPage::load(std::string &channel_url) {
+ PluginResult YoutubeVideoPage::load(std::string &title, std::string &channel_url) {
video_formats.clear();
audio_formats.clear();
@@ -1905,6 +1905,10 @@ namespace QuickMedia {
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())
+ title = title_json.asString();
+
const Json::Value &channel_id_json = video_details_json["channelId"];
if(channel_id_json.isString())
channel_url = "https://www.youtube.com/channel/" + channel_id_json.asString();