aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-06-16 14:43:20 +0200
committerdec05eba <dec05eba@protonmail.com>2022-06-16 15:09:30 +0200
commitad2685624cf233456623c5fa34083412df53873c (patch)
tree370acf204f01a9a6d877345b5f41977a8edd8441 /plugins
parente471a1f93ee23f0f729d64068504cb892481b56f (diff)
Soundcloud: fix title and download link not updating when changing video, fix text y offset after mgl update
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Lbry.hpp2
-rw-r--r--plugins/MediaGeneric.hpp2
-rw-r--r--plugins/Page.hpp6
-rw-r--r--plugins/Peertube.hpp2
-rw-r--r--plugins/Soundcloud.hpp2
-rw-r--r--plugins/Youtube.hpp2
6 files changed, 8 insertions, 8 deletions
diff --git a/plugins/Lbry.hpp b/plugins/Lbry.hpp
index d21778a..6198a9b 100644
--- a/plugins/Lbry.hpp
+++ b/plugins/Lbry.hpp
@@ -41,7 +41,7 @@ namespace QuickMedia {
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, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(const SubmitArgs &args, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
private:
std::string title;
std::string streaming_url;
diff --git a/plugins/MediaGeneric.hpp b/plugins/MediaGeneric.hpp
index 68ad22f..d9708aa 100644
--- a/plugins/MediaGeneric.hpp
+++ b/plugins/MediaGeneric.hpp
@@ -96,7 +96,7 @@ namespace QuickMedia {
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;
- PluginResult load(std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(const SubmitArgs &args, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
private:
MediaGenericSearchPage *search_page;
std::string video_url;
diff --git a/plugins/Page.hpp b/plugins/Page.hpp
index 1b8a391..64c24c3 100644
--- a/plugins/Page.hpp
+++ b/plugins/Page.hpp
@@ -24,7 +24,7 @@ namespace QuickMedia {
std::string title;
std::string url;
std::string thumbnail_url;
- void *userdata;
+ void *userdata = nullptr;
std::shared_ptr<BodyItemExtra> extra;
};
@@ -168,8 +168,8 @@ 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, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) {
- (void)title; (void)duration; (void)channel_url; (void)chapters; (void)err_str;
+ virtual PluginResult load(const SubmitArgs &args, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) {
+ (void)args; (void)title; (void)duration; (void)channel_url; (void)chapters; (void)err_str;
return PluginResult::OK;
}
virtual void mark_watched() {};
diff --git a/plugins/Peertube.hpp b/plugins/Peertube.hpp
index dfd5601..ac1a06b 100644
--- a/plugins/Peertube.hpp
+++ b/plugins/Peertube.hpp
@@ -81,7 +81,7 @@ namespace QuickMedia {
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, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(const SubmitArgs &args, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
bool autoplay_next_item() override { return autoplay_next; }
//void get_subtitles(SubtitleData &subtitle_data) override;
private:
diff --git a/plugins/Soundcloud.hpp b/plugins/Soundcloud.hpp
index 0ec0ae4..cf1d7dd 100644
--- a/plugins/Soundcloud.hpp
+++ b/plugins/Soundcloud.hpp
@@ -60,7 +60,7 @@ namespace QuickMedia {
public:
SoundcloudAudioPage(Program *program, std::string title, const std::string &url, std::string permalink_url) : VideoPage(program, url), title(std::move(title)), permalink_url(std::move(permalink_url)) {}
const char* get_title() const override { return ""; }
- PluginResult load(std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(const SubmitArgs &args, std::string &title, std::string &channel_url, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
bool autoplay_next_item() override { return true; }
std::string url_get_playable_url(const std::string &url) override;
std::string get_download_url(int max_height) override;
diff --git a/plugins/Youtube.hpp b/plugins/Youtube.hpp
index 78fc40f..dc604a9 100644
--- a/plugins/Youtube.hpp
+++ b/plugins/Youtube.hpp
@@ -151,7 +151,7 @@ namespace QuickMedia {
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, double &duration, std::vector<MediaChapter> &chapters, std::string &err_str) override;
+ PluginResult load(const SubmitArgs &args, 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;