feat(SongSpotlight): add Tidal (#927)

This commit is contained in:
nexpid 2026-03-21 16:28:40 +01:00 • committed by GitHub
parent c6b521b54f
commit 1c06574881
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 26 additions and 9 deletions

View file

@ -42,7 +42,7 @@
"@ffmpeg/ffmpeg": "^0.12.10",
"@ffmpeg/util": "^0.12.1",
"@intrnl/xxhash64": "^0.1.2",
"@song-spotlight/api": "^2.0.1",
"@song-spotlight/api": "^2.1.3",
"@streamparser/json": "^0.0.22",
"@types/less": "^3.0.8",
"@types/stylus": "^0.48.42",

10
pnpm-lock.yaml generated
View file

@ -26,8 +26,8 @@ importers:
specifier: ^0.1.2
version: 0.1.2
'@song-spotlight/api':
specifier: ^2.0.1
version: 2.0.1(typescript@5.9.3)
specifier: ^2.1.3
version: 2.1.3(typescript@5.9.3)
'@streamparser/json':
specifier: ^0.0.22
version: 0.0.22
@ -724,8 +724,8 @@ packages:
'@rtsao/scc@1.1.0':
resolution: {integrity: sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==}
'@song-spotlight/api@2.0.1':
resolution: {integrity: sha512-nxBJch8cGp10NYeJSp3DCPS/LYmlpcs9VCHrHzgCHFRICTKWhlpiUZgrACP9TmQ8RQsE4B9e23BcQDaqWqPCGg==}
'@song-spotlight/api@2.1.3':
resolution: {integrity: sha512-Wai7JHd9lrHtM/lkhfWQIFjIWKtP8iD+zj4Lnwbs/ykELR0MB2k56TDnQaRAelvu8XOygt27wfDBDQSEepPqdA==}
peerDependencies:
typescript: ^5
@ -3050,7 +3050,7 @@ snapshots:
'@rtsao/scc@1.1.0': {}
'@song-spotlight/api@2.0.1(typescript@5.9.3)':
'@song-spotlight/api@2.1.3(typescript@5.9.3)':
dependencies:
typescript: 5.9.3
optionalDependencies:

View file

@ -10,11 +10,12 @@ import { showToast, Toasts, UserStore } from "@webpack/common";
import { useAuthorizationStore } from "./stores/AuthorizationStore";
import { useSongStore } from "./stores/SongStore";
const api = "https://dc.songspotlight.nexpid.xyz/";
export const apiConstants = {
api: "https://dc.songspotlight.nexpid.xyz/",
api,
oauth2: {
clientId: "1157745434140344321",
redirectURL: "https://dc.songspotlight.nexpid.xyz/api/auth/authorize",
redirectURL: `${api}api/auth/authorize`,
},
songLimit: 6,
};

View file

@ -211,6 +211,21 @@ export function SpotifyIcon(props: JSX.IntrinsicElements["svg"]) {
</svg>
);
}
export function TidalIcon(props: JSX.IntrinsicElements["svg"]) {
return (
<svg
width={24}
height={24}
viewBox="0 0 24 24"
{...props}
>
<path fill={props.fill || "currentColor"} d="M15.5003 8.49936L12.0006 11.9997L8.5001 8.49936L12.0006 5.00047L15.5003 8.49936Z" />
<path fill={props.fill || "currentColor"} d="M15.5003 15.4996L12.0006 19L8.5001 15.4996L12.0006 11.9997L15.5003 15.4996Z" />
<path fill={props.fill || "currentColor"} d="M8.5001 8.49936L4.99973 12L1.5 8.49963L4.99973 5L8.5001 8.49936Z" />
<path fill={props.fill || "currentColor"} d="M22.5 8.49963L19.0003 12L15.4998 8.49963L19.0003 5L22.5 8.49963Z" />
</svg>
);
}
export function TrashIcon(props: JSX.IntrinsicElements["svg"]) {
return (
<svg

View file

@ -5,7 +5,7 @@
*/
import { cl } from "@equicordplugins/songSpotlight.desktop/lib/utils";
import { AppleMusicIcon, SoundcloudIcon, SpotifyIcon } from "@equicordplugins/songSpotlight.desktop/ui/common";
import { AppleMusicIcon, SoundcloudIcon, SpotifyIcon, TidalIcon } from "@equicordplugins/songSpotlight.desktop/ui/common";
import { getServiceLabel } from "@song-spotlight/api/util";
import { Tooltip, useMemo } from "@webpack/common";
import { JSX } from "react";
@ -14,6 +14,7 @@ const serviceIcons = {
applemusic: AppleMusicIcon,
soundcloud: SoundcloudIcon,
spotify: SpotifyIcon,
tidal: TidalIcon,
};
interface ServiceIconProps extends SvgProps {