aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/Peertube.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-09-04 05:01:36 +0200
committerdec05eba <dec05eba@protonmail.com>2022-09-04 08:44:51 +0200
commit87c8a2986d468a3fc897169c1b00fc4695e09d39 (patch)
treebfd1d39d84680389a2bd30c9e1cdde5e844a3a5b /src/plugins/Peertube.cpp
parent84f501f5211f09a09fc5384bf15415d0d0445a96 (diff)
Add dramacool
Diffstat (limited to 'src/plugins/Peertube.cpp')
-rw-r--r--src/plugins/Peertube.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/Peertube.cpp b/src/plugins/Peertube.cpp
index 4e19f1a..4fb2ac4 100644
--- a/src/plugins/Peertube.cpp
+++ b/src/plugins/Peertube.cpp
@@ -370,7 +370,7 @@ namespace QuickMedia {
}
// TODO: Media chapters
- PluginResult PeertubeVideoPage::load(const SubmitArgs&, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter>&, std::string &err_str) {
+ PluginResult PeertubeVideoPage::load(const SubmitArgs&, VideoInfo &video_info, std::string &err_str) {
Json::Value json_root;
std::string err_msg;
DownloadResult download_result = download_json(json_root, server + "/api/v1/videos/" + url, {}, true, &err_msg);
@@ -384,17 +384,17 @@ namespace QuickMedia {
const Json::Value &name_json = json_root["name"];
if(name_json.isString())
- title = name_json.asString();
+ video_info.title = name_json.asString();
const Json::Value &duration_json = json_root["duration"];
if(duration_json.isInt64())
- duration = duration_json.asInt64();
+ video_info.duration = duration_json.asInt64();
const Json::Value &channel_json = json_root["channel"];
if(channel_json.isObject()) {
const Json::Value &channel_url_json = channel_json["url"];
if(channel_url_json.isString())
- channel_url = channel_url_json.asString();
+ video_info.channel_url = channel_url_json.asString();
}
video_sources.clear();