diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-09-03 03:54:00 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-09-03 03:54:00 +0200 |
commit | 3f0421bea6b37d81d2d66c001b0fac2df91dd702 (patch) | |
tree | 560faf05481ba106aec6c79d478d018d02385c52 /plugins | |
parent | bab24cdda37e93bf87e487d22056361efaf90d50 (diff) |
Show youtube play fail reason in notification, more items below correct width!
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Page.hpp | 5 | ||||
-rw-r--r-- | plugins/Youtube.hpp | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp index 3ecb016..6944afb 100644 --- a/plugins/Page.hpp +++ b/plugins/Page.hpp @@ -151,7 +151,10 @@ namespace QuickMedia { 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; } // This needs to be called before the other functions are called - 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 PluginResult load(std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters, std::string &err_str) { + (void)title; (void)channel_url; (void)chapters; (void)err_str; + return PluginResult::OK; + } virtual void mark_watched() {}; // Should not do any network request to not slow down video loading virtual void get_subtitles(SubtitleData &subtitle_data) { (void)subtitle_data; } diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp index e2bc2a4..97dea19 100644 --- a/plugins/Youtube.hpp +++ b/plugins/Youtube.hpp @@ -151,11 +151,11 @@ namespace QuickMedia { std::string get_url_timestamp() override { return timestamp; } 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) override; + PluginResult load(std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters, std::string &err_str) override; void mark_watched() override; void get_subtitles(SubtitleData &subtitle_data) override; private: - PluginResult parse_video_response(const Json::Value &json_root, std::string &title, std::string &channel_url, std::vector<MediaChapter> &chapters); + 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); void parse_formats(const Json::Value &streaming_data_json); private: |