aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-07-15 12:48:38 +0200
committerdec05eba <dec05eba@protonmail.com>2022-07-15 12:48:38 +0200
commit6758cdc82e4cb295123b0a84819c6a6ebd5ebad0 (patch)
tree86ed3a0db9134d72937c813ab037688e581766c4 /src/plugins
parent0bf55deae8d8a681b32a1fa91908ed1f566dbbf5 (diff)
Youtube: do not autoplay next if starting qm with youtube url, opening youtube url in info page or matrix
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Info.cpp2
-rw-r--r--src/plugins/Mangadex.cpp3
-rw-r--r--src/plugins/NyaaSi.cpp2
-rw-r--r--src/plugins/Youtube.cpp2
4 files changed, 6 insertions, 3 deletions
diff --git a/src/plugins/Info.cpp b/src/plugins/Info.cpp
index 90c8fe1..252cbea 100644
--- a/src/plugins/Info.cpp
+++ b/src/plugins/Info.cpp
@@ -42,7 +42,7 @@ namespace QuickMedia {
const std::string search_url = "https://www.google.com/search?q=" + url_param_encode(search_term);
return open_with_browser(search_url);
} else if(is_youtube_url(args.url)) {
- result_tabs.push_back(Tab{nullptr, std::make_unique<YoutubeVideoPage>(program, args.url), nullptr});
+ result_tabs.push_back(Tab{nullptr, std::make_unique<YoutubeVideoPage>(program, args.url, false), nullptr});
return PluginResult::OK;
} else {
return open_with_browser(args.url);
diff --git a/src/plugins/Mangadex.cpp b/src/plugins/Mangadex.cpp
index 2efd2f1..c100b0b 100644
--- a/src/plugins/Mangadex.cpp
+++ b/src/plugins/Mangadex.cpp
@@ -107,8 +107,11 @@ namespace QuickMedia {
std::string title;
const Json::Value &title_en_json = title_json["en"];
+ const Json::Value &title_ja_json = title_json["ja"];
if(title_en_json.isString())
title = title_en_json.asString();
+ else if(title_ja_json.isString())
+ title = title_ja_json.asString();
else
title = "No title"; // TODO: Verify if this happens. If it happens, get the title in any available language
diff --git a/src/plugins/NyaaSi.cpp b/src/plugins/NyaaSi.cpp
index fc3e7ee..fd24e71 100644
--- a/src/plugins/NyaaSi.cpp
+++ b/src/plugins/NyaaSi.cpp
@@ -328,7 +328,7 @@ namespace QuickMedia {
std::string title;
BodyItems result_items;
- auto torrent_item = BodyItem::create("💾 Download magnet");
+ auto torrent_item = BodyItem::create("💾 Download");
std::string magnet_url;
std::string description;
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 1b46ed6..7552967 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -1883,7 +1883,7 @@ namespace QuickMedia {
return;
}
- YoutubeVideoPage::YoutubeVideoPage(Program *program, std::string url) : VideoPage(program, "") {
+ YoutubeVideoPage::YoutubeVideoPage(Program *program, std::string url, bool autoplay) : VideoPage(program, "", autoplay) {
set_url(std::move(url));
}