From 87c8a2986d468a3fc897169c1b00fc4695e09d39 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 4 Sep 2022 05:01:36 +0200 Subject: Add dramacool --- src/plugins/Peertube.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/Peertube.cpp') 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&, 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(); -- cgit v1.2.3