From be9944e24a9dc3365d9f807b5f6689710d21d28c Mon Sep 17 00:00:00 2001 From: dec05eba Date: Thu, 17 Jun 2021 23:15:39 +0200 Subject: Support youtu.be timestamps --- src/plugins/Youtube.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp index 5799a98..e5e721c 100644 --- a/src/plugins/Youtube.cpp +++ b/src/plugins/Youtube.cpp @@ -1799,8 +1799,11 @@ R"END( static void youtube_url_remove_timestamp(std::string &url, std::string ×tamp) { size_t timestamp_start = url.find("&t="); - if(timestamp_start == std::string::npos) - return; + if(timestamp_start == std::string::npos) { + timestamp_start = url.find("?t="); + if(timestamp_start == std::string::npos) + return; + } size_t timestamp_end = url.find("&", timestamp_start + 3); if(timestamp_end == std::string::npos) -- cgit v1.2.3