aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-27 22:35:29 +0200
committerdec05eba <dec05eba@protonmail.com>2021-07-27 22:35:29 +0200
commitb8e40694b539e74f1778b380087764bb76213fc5 (patch)
tree7adb8c9b8728decaab42d1994cbe804bc36c4a28 /src
parente5fc00e506806f06bde32e9334fdec57dd8cb86d (diff)
Fix youtube live streams that are hls manifest
Diffstat (limited to 'src')
-rw-r--r--src/Downloader.cpp3
-rw-r--r--src/QuickMedia.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/src/Downloader.cpp b/src/Downloader.cpp
index ae84973..68bbf32 100644
--- a/src/Downloader.cpp
+++ b/src/Downloader.cpp
@@ -7,9 +7,8 @@
#include <signal.h>
namespace QuickMedia {
- // TODO: Test with video that has hlsManifestUrl
static bool youtube_url_is_live_stream(const std::string &url) {
- return url.find("yt_live_broadcast") != std::string::npos;
+ return url.find("yt_live_broadcast") != std::string::npos || url.find("manifest/") != std::string::npos;
}
CurlDownloader::CurlDownloader(const std::string &url, const std::string &output_filepath, int64_t content_length) : Downloader(url, output_filepath), content_length(content_length) {
diff --git a/src/QuickMedia.cpp b/src/QuickMedia.cpp
index 5af793f..f4cc2dd 100644
--- a/src/QuickMedia.cpp
+++ b/src/QuickMedia.cpp
@@ -2520,9 +2520,8 @@ namespace QuickMedia {
return true;
}
- // TODO: Test with video that has hlsManifestUrl
static bool youtube_url_is_live_stream(const std::string &url) {
- return url.find("yt_live_broadcast") != std::string::npos;
+ return url.find("yt_live_broadcast") != std::string::npos || url.find("manifest/") != std::string::npos;
}
#define CLEANMASK(mask) ((mask) & (ShiftMask|ControlMask|Mod1Mask|Mod4Mask|Mod5Mask))