aboutsummaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-03-10 16:15:59 +0100
committerdec05eba <dec05eba@protonmail.com>2022-03-10 16:15:59 +0100
commit2b29acfb9f70cb7aff7d5da1f5fc59ee319e3606 (patch)
tree7f5f0b5f97268779831370d104f2b51ef1482a3a /src/plugins
parent47cd79054bb5033eba5776b1107537c8db30984c (diff)
Focus video player when focusing the main window
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/Youtube.cpp4
-rw-r--r--src/plugins/youtube/YoutubeMediaProxy.cpp2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index 2d92cd8..df79701 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -1860,6 +1860,7 @@ namespace QuickMedia {
}
std::string YoutubeVideoPage::get_url_timestamp() {
+ #if 0
if(!timestamp.empty())
return timestamp;
@@ -1881,6 +1882,9 @@ namespace QuickMedia {
return "";
else
return std::to_string(it->second.time_pos_sec);
+ #else
+ return timestamp;
+ #endif
}
BodyItems YoutubeVideoPage::get_related_media(const std::string &url) {
diff --git a/src/plugins/youtube/YoutubeMediaProxy.cpp b/src/plugins/youtube/YoutubeMediaProxy.cpp
index 0c0d8dd..e51e3d9 100644
--- a/src/plugins/youtube/YoutubeMediaProxy.cpp
+++ b/src/plugins/youtube/YoutubeMediaProxy.cpp
@@ -447,7 +447,7 @@ namespace QuickMedia {
return Error::OK;
}
- const ssize_t num_bytes_written = write_all_blocking(client_fd, buffer_start + buffer_offset, num_bytes_to_write);
+ const ssize_t num_bytes_written = write_all(client_fd, buffer_start + buffer_offset, num_bytes_to_write);
if(num_bytes_written == -1) {
const int err = errno;
if(err == EAGAIN || err == EWOULDBLOCK) {