aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO1
-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
5 files changed, 5 insertions, 12 deletions
diff --git a/TODO b/TODO
index 853ba71..670ff89 100644
--- a/TODO
+++ b/TODO
@@ -120,7 +120,6 @@ Create a workaround for dwm terminal swallow patch stealing mpv when moving Quic
Add option to decline and mute user in invites. This is to combat invite spam, where muted users cant invite you.
Allow hiding videos so they dont show up in recommendations and related videos.
Add an option to select video resolution, if we want to use less power and less bandwidth for example.
-Use mpv option --gpu-context=x11egl on pinephone to force xwayland on wayland, to be able to embed the mpv window inside the quickmedia.
Replies to the local user shouldn't remove the red text. Maybe fix this by checking if the reply to message user is the local user or when the replied to message has loaded then make the reply red if its a reply to us. Also for existing messages check if the message is a notification message and then make the message red.
Check what happens with xsrf_token if comments are not fetched for a long time. Does it time out? if so do we need to refetch the video page to get the new token?.
Add support for comments in live youtube videos, api is at: https://www.youtube.com/youtubei/v1/live_chat/get_live_chat?key=AIzaSyAO_FJ2SlqU8Q4STEHLGCilw_Y9_11qcW8.
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())