fix(openInApp): Tidal regex (again) (#3753)

* fix tidal regex to support listen and strip the /u

* remove unnecessary $

---------

Co-authored-by: lewisakura <lewi@lewisakura.moe>
This commit is contained in:
Aztup 2025-12-28 21:50:49 +01:00 • committed by GitHub
parent 2fb549457b
commit eb1edef868
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@ const UrlReplacementRules: Record<string, URLReplacementRule> = {
description: "Open Epic Games links in the Epic Games Launcher",
},
tidal: {
match: /^https:\/\/tidal\.com\/(?:browse\/)?(track|album|artist|playlist|user|video|mix)\/(.+)(?:\?.+?)?$/,
match: /^https:\/\/(?:listen\.)?tidal\.com\/(?:browse\/)?(track|album|artist|playlist|user|video|mix)\/([a-f0-9-]+).*/,
replace: (_, type, id) => `tidal://${type}/${id}`,
description: "Open Tidal links in the Tidal app",
},