|
@ -36,7 +36,7 @@ const authParams = legacyAuth |
|
|
? { |
|
|
? { |
|
|
u: auth.username, |
|
|
u: auth.username, |
|
|
p: auth.password, |
|
|
p: auth.password, |
|
|
v: '1.15.0', |
|
|
v: '1.13.0', |
|
|
c: 'sonixd', |
|
|
c: 'sonixd', |
|
|
f: 'json', |
|
|
f: 'json', |
|
|
} |
|
|
} |
|
@ -44,7 +44,7 @@ const authParams = legacyAuth |
|
|
u: auth.username, |
|
|
u: auth.username, |
|
|
s: auth.salt, |
|
|
s: auth.salt, |
|
|
t: auth.hash, |
|
|
t: auth.hash, |
|
|
v: '1.15.0', |
|
|
v: '1.13.0', |
|
|
c: 'sonixd', |
|
|
c: 'sonixd', |
|
|
f: 'json', |
|
|
f: 'json', |
|
|
}; |
|
|
}; |
|
@ -59,7 +59,7 @@ api.interceptors.request.use((config) => { |
|
|
config.params.s = legacyAuth ? null : auth.salt; |
|
|
config.params.s = legacyAuth ? null : auth.salt; |
|
|
config.params.t = legacyAuth ? null : auth.hash; |
|
|
config.params.t = legacyAuth ? null : auth.hash; |
|
|
config.params.p = legacyAuth ? auth.password : null; |
|
|
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.c = 'sonixd'; |
|
|
config.params.f = 'json'; |
|
|
config.params.f = 'json'; |
|
|
return config; |
|
|
return config; |
|
@ -102,7 +102,7 @@ const getCoverArtUrl = (item: any, useLegacyAuth: boolean, size?: number) => { |
|
|
`?id=${item.coverArt}` + |
|
|
`?id=${item.coverArt}` + |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&p=${auth.password}` + |
|
|
`&p=${auth.password}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` + |
|
|
`&c=sonixd` + |
|
|
`${size ? `&size=${size}` : ''}` |
|
|
`${size ? `&size=${size}` : ''}` |
|
|
); |
|
|
); |
|
@ -114,7 +114,7 @@ const getCoverArtUrl = (item: any, useLegacyAuth: boolean, size?: number) => { |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` + |
|
|
`&c=sonixd` + |
|
|
`${size ? `&size=${size}` : ''}` |
|
|
`${size ? `&size=${size}` : ''}` |
|
|
); |
|
|
); |
|
@ -127,7 +127,7 @@ export const getDownloadUrl = (options: { id: string }, useLegacyAuth = legacyAu |
|
|
`?id=${options.id}` + |
|
|
`?id=${options.id}` + |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&p=${auth.password}` + |
|
|
`&p=${auth.password}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` |
|
|
`&c=sonixd` |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
@ -138,7 +138,7 @@ export const getDownloadUrl = (options: { id: string }, useLegacyAuth = legacyAu |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` |
|
|
`&c=sonixd` |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
@ -150,7 +150,7 @@ const getStreamUrl = (id: string, useLegacyAuth: boolean) => { |
|
|
`?id=${id}` + |
|
|
`?id=${id}` + |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&p=${auth.password}` + |
|
|
`&p=${auth.password}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` |
|
|
`&c=sonixd` |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
@ -161,7 +161,7 @@ const getStreamUrl = (id: string, useLegacyAuth: boolean) => { |
|
|
`&u=${auth.username}` + |
|
|
`&u=${auth.username}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&s=${auth.salt}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&t=${auth.hash}` + |
|
|
`&v=1.15.0` + |
|
|
`&v=1.13.0` + |
|
|
`&c=sonixd` |
|
|
`&c=sonixd` |
|
|
); |
|
|
); |
|
|
}; |
|
|
}; |
|
|