aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Page.hpp6
-rw-r--r--plugins/Youtube.hpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 97b0340..044759a 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -134,12 +134,18 @@ namespace QuickMedia {
std::string title;
};
+ struct SponsorSegment {
+ double start_seconds;
+ double end_seconds;
+ };
+
struct VideoInfo {
std::string title;
std::string channel_url;
double duration = 0.0;
std::vector<MediaChapter> chapters;
std::string referer;
+ std::vector<SponsorSegment> sponsor_segments;
};
class VideoPage : public Page {
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index ac92526..d7008ae 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -187,7 +187,7 @@ namespace QuickMedia {
void set_watch_progress(int64_t time_pos_sec, int64_t duration_sec) override;
bool autoplay_next_item() override { return goto_next_item; }
private:
- PluginResult parse_video_response(const Json::Value &json_root, std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters, std::string &err_str);
+ PluginResult parse_video_response(const Json::Value &json_root, std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters, std::vector<SponsorSegment> &sponsor_segments, std::string &err_str);
void parse_format(const Json::Value &format_json, bool is_adaptive);
void parse_formats(const Json::Value &streaming_data_json);
private: