diff --git a/YoutubeConfig.json b/YoutubeConfig.json index e393eb5210330e818e0af8f5d7124d330e50ef84..eb60848ec59c8cf58bee66d468d1fade22b2ec10 100644 --- a/YoutubeConfig.json +++ b/YoutubeConfig.json @@ -7,7 +7,7 @@ "sourceUrl": "https://plugins.grayjay.app/Youtube/YoutubeConfig.json", "repositoryUrl": "https://futo.org", "scriptUrl": "./YoutubeScript.js", - "version": 104, + "version": 106, "iconUrl": "./youtube.png", "id": "35ae969a-a7db-11ed-afa1-0242ac120002", diff --git a/YoutubeScript.js b/YoutubeScript.js index a5cd5b8bd113ebccd3f520757e4dd47db511b980..58e7d5e4016b86f4c5b04e57423c71eec482af04 100644 --- a/YoutubeScript.js +++ b/YoutubeScript.js @@ -284,10 +284,19 @@ source.getChannelUrlByClaim = (claimType, claimValues) => { return null; const atName = values.find(x=>x.startsWith("@")); if(atName) - return URL_BASE + atName; + return URL_BASE + "/" + atName; else - return URL_BASE + "/c/" + values[0]; -} + return URL_BASE + "/channel/" + values[0]; +} +source.getChannelTemplateByClaimMap = () => { + return { + //Youtube + 2: { //TODO: Ideally these are turned around, requires verifier change.. + 0: URL_BASE + "/channel/{{CLAIMVALUE}}", + 1: URL_BASE + "/{{CLAIMVALUE}}" + } + }; +}; //Video source.isContentDetailsUrl = (url) => {