aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2024-04-03 21:14:43 +0200
committerdec05eba <dec05eba@protonmail.com>2024-04-03 21:14:43 +0200
commitceb1a46b665440c45b97071a8b233ff44275ddaf (patch)
tree32ed3d1cf1d8218a0c0b63bfc8dd7a8a9803da3d /src
parent1a2a558681a146c05c34642596b39651bb69ec9e (diff)
Sponsorblock: add api_endpoint option
Diffstat (limited to 'src')
-rw-r--r--src/Config.cpp1
-rw-r--r--src/plugins/Youtube.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/Config.cpp b/src/Config.cpp
index cc1c476..8a9752d 100644
--- a/src/Config.cpp
+++ b/src/Config.cpp
@@ -284,6 +284,7 @@ namespace QuickMedia {
const Json::Value &sponsorblock_json = youtube_json["sponsorblock"];
if(sponsorblock_json.isObject()) {
get_json_value(sponsorblock_json, "enable", config->youtube.sponsorblock.enable);
+ get_json_value(sponsorblock_json, "api_endpoint", config->youtube.sponsorblock.api_endpoint);
get_json_value(sponsorblock_json, "min_votes", config->youtube.sponsorblock.min_votes);
}
}
diff --git a/src/plugins/Youtube.cpp b/src/plugins/Youtube.cpp
index bcb6cf6..1a29110 100644
--- a/src/plugins/Youtube.cpp
+++ b/src/plugins/Youtube.cpp
@@ -3072,7 +3072,7 @@ namespace QuickMedia {
return;
}
- const std::string sponsorblock_url = "https://sponsor.ajay.app/api/skipSegments?videoID=" + video_id;
+ const std::string sponsorblock_url = get_config().youtube.sponsorblock.api_endpoint + "/api/skipSegments?videoID=" + video_id;
Json::Value json_root;
if(page->download_json(json_root, sponsorblock_url, {}) != DownloadResult::OK)
return;