From f4d64616904dabc1b8bd4dd15fccc31c45c147d0 Mon Sep 17 00:00:00 2001 From: Aztup <55710232+Aztup@users.noreply.github.com> Date: Wed, 15 May 2024 04:35:00 +0200 Subject: [PATCH] feat(plugins/openInApp) Add tidal support (#2404) Co-authored-by: vee --- src/main/utils/constants.ts | 1 + src/plugins/openInApp/index.ts | 21 ++++++++++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/main/utils/constants.ts b/src/main/utils/constants.ts index 6c076c32..9513da51 100644 --- a/src/main/utils/constants.ts +++ b/src/main/utils/constants.ts @@ -35,6 +35,7 @@ export const ALLOWED_PROTOCOLS = [ "steam:", "spotify:", "com.epicgames.launcher:", + "tidal:" ]; export const IS_VANILLA = /* @__PURE__ */ process.argv.includes("--vanilla"); diff --git a/src/plugins/openInApp/index.ts b/src/plugins/openInApp/index.ts index 0835c061..83da5f3c 100644 --- a/src/plugins/openInApp/index.ts +++ b/src/plugins/openInApp/index.ts @@ -26,6 +26,7 @@ const ShortUrlMatcher = /^https:\/\/(spotify\.link|s\.team)\/.+$/; const SpotifyMatcher = /^https:\/\/open\.spotify\.com\/(track|album|artist|playlist|user|episode)\/(.+)(?:\?.+?)?$/; const SteamMatcher = /^https:\/\/(steamcommunity\.com|(?:help|store)\.steampowered\.com)\/.+$/; const EpicMatcher = /^https:\/\/store\.epicgames\.com\/(.+)$/; +const TidalMatcher = /^https:\/\/tidal\.com\/browse\/(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/; const settings = definePluginSettings({ spotify: { @@ -42,6 +43,11 @@ const settings = definePluginSettings({ type: OptionType.BOOLEAN, description: "Open Epic Games links in the Epic Games Launcher", default: true, + }, + tidal: { + type: OptionType.BOOLEAN, + description: "Open Tidal links in the Tidal app", + default: true, } }); @@ -49,7 +55,7 @@ const Native = VencordNative.pluginHelpers.OpenInApp as PluginNative