aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-05-04 12:37:22 +0200
committerdec05eba <dec05eba@protonmail.com>2021-05-04 12:37:22 +0200
commitb6b4db460ce5bfdfe7c4e46a89ef370b6cc31752 (patch)
treef62748bf220984eba23705a945335fb9506a543d /src
parentab5065e541cb6f84b11062892ce25f033c7fa82d (diff)
Use x11 on wayland, to make mpv embedding possible
Diffstat (limited to 'src')
-rw-r--r--src/QuickMedia.cpp9
-rw-r--r--src/VideoPlayer.cpp1
-rw-r--r--src/plugins/Manganelo.cpp2
-rw-r--r--src/plugins/Youtube.cpp4
4 files changed, 5 insertions, 11 deletions
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index aebe86e..5ffc3f6 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2312,14 +2312,11 @@ namespace QuickMedia {
bool cursor_visible = true;
sf::Clock cursor_hide_timer;
- auto save_video_url_to_clipboard = [&original_video_url, &video_player_window, &video_player]() {
- if(!video_player_window)
- return;
-
+ auto save_video_url_to_clipboard = [&original_video_url, &video_player]() {
if(video_url_supports_timestamp(original_video_url)) {
// TODO: Remove timestamp (&t= or ?t=) from video_url
- double time_in_file;
- if(video_player->get_time_in_file(&time_in_file) != VideoPlayer::Error::OK)
+ double time_in_file = 0.0;
+ if(video_player && (video_player->get_time_in_file(&time_in_file) != VideoPlayer::Error::OK))
time_in_file = 0.0;
std::string clipboard = original_video_url;
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 3f3df0c..a6f3640 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -109,6 +109,7 @@ namespace QuickMedia {
ytdl_format.c_str(),
// TODO: Disable hr seek on low power devices?
"--hr-seek=yes",
+ "--gpu-context=x11egl",
input_conf.c_str(),
wid_arg.c_str()
});
diff --git a/src/plugins/Manganelo.cpp b/src/plugins/Manganelo.cpp
index e6bdfc0..960caaf 100644
--- a/src/plugins/Manganelo.cpp
+++ b/src/plugins/Manganelo.cpp
@@ -200,7 +200,7 @@ namespace QuickMedia {
const char *href = quickmedia_html_node_get_attribute_value(node, "href");
const char *title = quickmedia_html_node_get_attribute_value(node, "title");
if(href && title && strstr(href, "/manga/")) {
- auto body_item = BodyItem::create(title);
+ auto body_item = BodyItem::create(strip(title));
body_item->url = strip(href);
item_data->push_back(std::move(body_item));
}
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 6149b84..cbe6b81 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -241,10 +241,6 @@ namespace QuickMedia {
if(!desc.empty())
desc += " • ";
desc += video_count.value();
- if(strcmp(video_count.value().c_str(), "1") == 0)
- desc += " video";
- else
- desc += " videos";
}
if(description) {
if(!desc.empty())