mirror of
https://github.com/jeffvli/sonixd.git
synced 2026-04-29 02:32:37 -04:00
Change Subsonic API version for server support
- 1.15.0 -> 1.13.0
This commit is contained in:
@@ -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`
|
||||
);
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user