diff --git a/src/api/api.ts b/src/api/api.ts index a3a5278..69b6279 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -36,7 +36,7 @@ const authParams = legacyAuth ? { u: auth.username, p: auth.password, - v: '1.15.0', + v: '1.13.0', c: 'sonixd', f: 'json', } @@ -44,7 +44,7 @@ const authParams = legacyAuth u: auth.username, s: auth.salt, t: auth.hash, - v: '1.15.0', + v: '1.13.0', c: 'sonixd', f: 'json', }; @@ -59,7 +59,7 @@ api.interceptors.request.use((config) => { config.params.s = legacyAuth ? null : auth.salt; config.params.t = legacyAuth ? null : auth.hash; config.params.p = legacyAuth ? auth.password : null; - config.params.v = '1.15.0'; + config.params.v = '1.13.0'; config.params.c = 'sonixd'; config.params.f = 'json'; return config; @@ -102,7 +102,7 @@ const getCoverArtUrl = (item: any, useLegacyAuth: boolean, size?: number) => { `?id=${item.coverArt}` + `&u=${auth.username}` + `&p=${auth.password}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` + `${size ? `&size=${size}` : ''}` ); @@ -114,7 +114,7 @@ const getCoverArtUrl = (item: any, useLegacyAuth: boolean, size?: number) => { `&u=${auth.username}` + `&s=${auth.salt}` + `&t=${auth.hash}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` + `${size ? `&size=${size}` : ''}` ); @@ -127,7 +127,7 @@ export const getDownloadUrl = (options: { id: string }, useLegacyAuth = legacyAu `?id=${options.id}` + `&u=${auth.username}` + `&p=${auth.password}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` ); } @@ -138,7 +138,7 @@ export const getDownloadUrl = (options: { id: string }, useLegacyAuth = legacyAu `&u=${auth.username}` + `&s=${auth.salt}` + `&t=${auth.hash}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` ); }; @@ -150,7 +150,7 @@ const getStreamUrl = (id: string, useLegacyAuth: boolean) => { `?id=${id}` + `&u=${auth.username}` + `&p=${auth.password}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` ); } @@ -161,7 +161,7 @@ const getStreamUrl = (id: string, useLegacyAuth: boolean) => { `&u=${auth.username}` + `&s=${auth.salt}` + `&t=${auth.hash}` + - `&v=1.15.0` + + `&v=1.13.0` + `&c=sonixd` ); }; diff --git a/src/components/settings/Login.tsx b/src/components/settings/Login.tsx index 2296e20..7bea46a 100644 --- a/src/components/settings/Login.tsx +++ b/src/components/settings/Login.tsx @@ -37,10 +37,10 @@ const Login = () => { try { const testConnection = legacyAuth ? await axios.get( - `${cleanServerName}/rest/ping?v=1.15.0&c=sonixd&f=json&u=${userName}&p=${password}` + `${cleanServerName}/rest/ping?v=1.13.0&c=sonixd&f=json&u=${userName}&p=${password}` ) : await axios.get( - `${cleanServerName}/rest/ping?v=1.15.0&c=sonixd&f=json&u=${userName}&s=${salt}&t=${hash}` + `${cleanServerName}/rest/ping?v=1.13.0&c=sonixd&f=json&u=${userName}&s=${salt}&t=${hash}` ); // Since a valid request will return a 200 response, we need to check that there