From 3f457da0d7a9df5a0fba27024b2a9aae7af93945 Mon Sep 17 00:00:00 2001
From: Kelvin <kelvin@revodux.com>
Date: Fri, 18 Aug 2023 17:15:35 +0200
Subject: [PATCH] ClaimID Support

---
 TwitchConfig.json |  2 +-
 TwitchScript.js   | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/TwitchConfig.json b/TwitchConfig.json
index 8e2a932..f660b6c 100644
--- a/TwitchConfig.json
+++ b/TwitchConfig.json
@@ -7,7 +7,7 @@
 	"sourceUrl": "https://autoupdate.unkto.com/sources/Twitch/TwitchConfig.json",
 	"repositoryUrl": "https://futo.org",
 	"scriptUrl": "./TwitchScript.js",
-	"version": 7,
+	"version": 8,
 
 	"iconUrl": "./twitch.png",
 	"id": "c0f315f9-0992-4508-a061-f2738724c331",
diff --git a/TwitchScript.js b/TwitchScript.js
index 57592c7..d6e4802 100644
--- a/TwitchScript.js
+++ b/TwitchScript.js
@@ -142,6 +142,16 @@ source.getChannel = function (url) {
 source.getChannelContents = function (url) {
     return getChannelPager({ url, page_size: 20, cursor: null })
 }
+
+source.getChannelTemplateByClaimMap = () => {
+    return {
+        //SoundCloud
+        14: {
+            0: BASE_URL + "{{CLAIMVALUE}}"
+        }
+    };
+};
+
 source.isContentDetailsUrl = function (url) {
     // https://www.twitch.tv/user or https://www.twitch.tv/videos/123456789
     return /twitch\.tv\/[a-zA-Z0-9-_]+\/?/.test(url) || /twitch\.tv\/videos\/[0-9]+\/?/.test(url)
-- 
GitLab