aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-06-17 23:15:39 +0200
committerdec05eba <dec05eba@protonmail.com>2021-06-17 23:15:39 +0200
commitbe9944e24a9dc3365d9f807b5f6689710d21d28c (patch)
treef65faf4ceeb8a3c92ef5a3b42c281e4c5e2d6b81 /src
parent2ab6101995bae87a93bcbed4df6a8643d424f127 (diff)
Support youtu.be timestamps
Diffstat (limited to 'src')
-rw-r--r--src/plugins/Youtube.cpp7
1 files changed, 5 insertions, 2 deletions
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 &timestamp) {
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)