aboutsummaryrefslogtreecommitdiff
path: root/plugins/Page.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Page.hpp')
-rw-r--r--plugins/Page.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index c1ca012..6ac0450 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -136,9 +136,10 @@ namespace QuickMedia {
class VideoPage : public Page {
public:
- VideoPage(Program *program, std::string url) : Page(program), url(std::move(url)) {}
+ VideoPage(Program *program, std::string url, bool autoplay = true) : Page(program), url(std::move(url)), autoplay(autoplay) {}
virtual PageTypez get_type() const override { return PageTypez::VIDEO; }
virtual bool autoplay_next_item() { return false; }
+ bool should_autoplay() const { return autoplay; }
virtual BodyItems get_related_media(const std::string &url) { (void)url; return {}; }
virtual PluginResult get_related_pages(const BodyItems &related_videos, const std::string &channel_url, std::vector<Tab> &result_tabs) {
(void)related_videos;
@@ -181,6 +182,7 @@ namespace QuickMedia {
virtual void set_watch_progress(int64_t time_pos_sec, int64_t duration_sec) { (void)time_pos_sec; (void)duration_sec; }
protected:
std::string url;
+ bool autoplay;
};
class BookmarksPage : public LazyFetchPage {