aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-09-09 11:54:24 +0200
committerdec05eba <dec05eba@protonmail.com>2021-09-09 11:57:38 +0200
commitc64d577cb053b6fee8e84f768419e84c3c9df2cc (patch)
tree26f9b83b97670f38155d8ca21bb94d77c93b15ad /plugins
parent76ef34393aa72230a3490ecf7b06647ede1448da (diff)
Fix peertube video download
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Page.hpp1
-rw-r--r--plugins/Peertube.hpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 071351b..925a53a 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -135,6 +135,7 @@ namespace QuickMedia {
virtual std::unique_ptr<Page> create_channels_page(Program *program, const std::string &channel_url) = 0;
virtual void set_url(std::string new_url) { url = std::move(new_url); }
std::string get_url() { return url; }
+ virtual std::string get_download_url(int max_height) { return url; }
// Returns empty string for no timestamp or if the video doesn't support timestamps.
// Timestamp is in seconds.
virtual std::string get_url_timestamp() { return ""; }
diff --git a/plugins/Peertube.hpp b/plugins/Peertube.hpp
index 833cb5f..88ba1ca 100644
--- a/plugins/Peertube.hpp
+++ b/plugins/Peertube.hpp
@@ -78,6 +78,7 @@ namespace QuickMedia {
std::unique_ptr<Page> create_comments_page(Program *program) override;
std::unique_ptr<RelatedVideosPage> create_related_videos_page(Program *program) override;
std::unique_ptr<Page> create_channels_page(Program *program, const std::string &channel_url) override;
+ std::string get_download_url(int max_height) 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;