aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-08-09 19:00:59 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-09 19:00:59 +0200
commit27a79a205f865a4023d8e78d0699cc12f2f707cf (patch)
treee267ceeea50c1356ea16f7e2ff86ab7b03f55a48
parentee76ed6b9c0c31a341d7633ae7424ede2ca3f154 (diff)
Disable media proxy curl buffering
-rw-r--r--src/plugins/youtube/YoutubeMediaProxy.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/youtube/YoutubeMediaProxy.cpp b/src/plugins/youtube/YoutubeMediaProxy.cpp
index c1c3c0b..61eb374 100644
--- a/src/plugins/youtube/YoutubeMediaProxy.cpp
+++ b/src/plugins/youtube/YoutubeMediaProxy.cpp
@@ -20,7 +20,7 @@ namespace QuickMedia {
static const int MAX_BUFFER_SIZE = 65536;
static const int64_t RANGE = 524287;
static const int64_t THROTTLED_DOWNLOAD_LIMIT_KB = 80; // TODO: What about people with really slow internet? What if the video player cache is not working and download is stuck, leading to false download speed calculation?
- static const int64_t THROTTLED_DURATION_SECS = 2;
+ static const int64_t THROTTLED_DURATION_SECS = 3;
static const char download_error_response_msg[] =
"HTTP/1.1 500 Internal Server Error\r\n"
"Content-Length: 0\r\n\r\n";
@@ -40,6 +40,7 @@ namespace QuickMedia {
std::string url = media_url + "&rn=" + std::to_string(rn) + "&rbuf=" + std::to_string(rbuf);
std::vector<const char*> args = { "curl",
//"-H", "Accept-Language: en-US,en;q=0.5", "-H", "Connection: keep-alive",
+ "--no-buffer",
"-H", "user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36",
"-g", "-s", "-L", "-f" };