aboutsummaryrefslogtreecommitdiff
path: root/plugins/Youtube.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Youtube.hpp')
-rw-r--r--plugins/Youtube.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index 4772aa1..8844c5b 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -29,6 +29,7 @@ namespace QuickMedia {
std::string author;
std::string views;
std::string description;
+ double duration = 0.0;
};
// Returns |url| if the url is already a youtube url
@@ -144,12 +145,13 @@ namespace QuickMedia {
PluginResult get_related_pages(const BodyItems &related_videos, const std::string &channel_url, std::vector<Tab> &result_tabs) override;
int get_related_pages_first_tab() override { return 1; }
void set_url(std::string new_url) override;
- std::string get_url_timestamp() override { return timestamp; }
+ std::string get_url_timestamp() override;
std::string get_video_url(int max_height, bool &has_embedded_audio, std::string &ext) override;
std::string get_audio_url(std::string &ext) override;
- PluginResult load(std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
void mark_watched() override;
void get_subtitles(SubtitleData &subtitle_data) override;
+ void set_watch_progress(int64_t time_pos_sec, int64_t duration_sec) override;
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);
void parse_format(const Json::Value &format_json, bool is_adaptive);