aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-04-27 00:07:33 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-27 00:07:33 +0200
commit09d2e8bde4c71b75ac9df65586bd8b7ff0a7b16b (patch)
treeb339703aa4a4219e4fedbeaf9ad9c2bcf9971d01 /include
parent2b746f718d0ddecc4d7fe19ad4c5d842cc530628 (diff)
Temporary depend on yt-dlp for youtube since youtube broke (throttle sig)
Diffstat (limited to 'include')
-rw-r--r--include/Config.hpp2
-rw-r--r--include/Downloader.hpp3
-rw-r--r--include/QuickMedia.hpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/include/Config.hpp b/include/Config.hpp
index 3a172d2..e0756cf 100644
--- a/include/Config.hpp
+++ b/include/Config.hpp
@@ -45,7 +45,7 @@ namespace QuickMedia {
};
struct YoutubeConfig {
- bool load_progress = true;
+ bool load_progress = false;
};
struct MatrixConfig {
diff --git a/include/Downloader.hpp b/include/Downloader.hpp
index cb70f2e..1f926c3 100644
--- a/include/Downloader.hpp
+++ b/include/Downloader.hpp
@@ -55,7 +55,7 @@ namespace QuickMedia {
class YoutubeDlDownloader : public Downloader {
public:
- YoutubeDlDownloader(const std::string &url, const std::string &output_filepath, bool no_video);
+ YoutubeDlDownloader(const char *yt_dl_name, const std::string &url, const std::string &output_filepath, bool no_video);
bool start() override;
bool stop(bool download_completed) override;
DownloadUpdateStatus update() override;
@@ -72,6 +72,7 @@ namespace QuickMedia {
std::string download_speed_text;
bool no_video;
bool finished = false;
+ const char *yt_dl_name;
};
struct MediaMetadata {
diff --git a/include/QuickMedia.hpp b/include/QuickMedia.hpp
index 4edea6e..0f8837d 100644
--- a/include/QuickMedia.hpp
+++ b/include/QuickMedia.hpp
@@ -119,6 +119,7 @@ namespace QuickMedia {
void set_clipboard(const std::string &str);
private:
void init(mgl::WindowHandle parent_window, std::string &program_path, bool no_dialog);
+ void check_youtube_dl_installed(const std::string &plugin_name);
void load_plugin_by_name(std::vector<Tab> &tabs, int &start_tab_index, FileManagerMimeType fm_mime_type, FileSelectionHandler file_selection_handler, std::string instance);
void common_event_handler(mgl::Event &event);
void handle_x11_events();
@@ -240,5 +241,6 @@ namespace QuickMedia {
bool use_youtube_dl = false;
int video_max_height = 0;
std::mutex login_inputs_mutex;
+ const char *yt_dl_name = nullptr;
};
}