aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-19 13:13:59 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-19 13:13:59 +0200
commit85c6c916541968f298badb391b718cdf6d81d332 (patch)
treebf69ea6c1d3a67ec7d41786b5cf883f93b3b87c6 /plugins
parent3f66a053942be531fe124cc16bb6b2e0eb94934e (diff)
Support youtube description chapters
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Page.hpp3
-rw-r--r--plugins/Youtube.hpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 39222b1..0d45b9e 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -5,6 +5,7 @@
#include "../include/Tab.hpp"
#include "../include/SearchBar.hpp"
#include "../include/Body.hpp"
+#include "../include/MediaChapter.hpp"
namespace QuickMedia {
constexpr int SEARCH_DELAY_FILTER = 50;
@@ -126,7 +127,7 @@ namespace QuickMedia {
virtual std::string get_audio_url() { return ""; }
virtual std::string url_get_playable_url(const std::string &url) { return url; }
virtual bool video_should_be_skipped(const std::string &url) { (void)url; return false; }
- virtual PluginResult load(std::string &title, std::string &channel_url) { (void)title; (void)channel_url; return PluginResult::OK; }
+ virtual PluginResult load(std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters) { (void)title; (void)channel_url; (void)chapters; return PluginResult::OK; }
virtual void mark_watched() {};
protected:
std::string url;
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index d8c4cc2..dcccc88 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -143,7 +143,7 @@ namespace QuickMedia {
std::string get_url_timestamp() override { return timestamp; }
std::string get_video_url(int max_height, bool &has_embedded_audio) override;
std::string get_audio_url() override;
- PluginResult load(std::string &title, std::string &channel_url) override;
+ PluginResult load(std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters) override;
void mark_watched() override;
private:
void parse_format(const Json::Value &format_json, bool is_adaptive);