Added deezer unreachable differentiation to the vpn warning

This commit is contained in:
RemixDev 2022-02-12 14:36:02 +01:00
parent 86d8853863
commit ff4e20c6f4
2 changed files with 5 additions and 5 deletions

View File

@ -31,7 +31,7 @@ export class DeemixApp {
queue: any
currentJob: any
deezerAvailable: boolean | null
deezerAvailable: string | null
latestVersion: string | null
plugins: any
@ -58,7 +58,7 @@ export class DeemixApp {
this.restoreQueueFromDisk()
}
async isDeezerAvailable(): Promise<boolean> {
async isDeezerAvailable(): Promise<string> {
if (this.deezerAvailable === null) {
let response
try {
@ -71,11 +71,11 @@ export class DeemixApp {
})
} catch (e) {
console.trace(e)
this.deezerAvailable = false
this.deezerAvailable = 'no-network'
return this.deezerAvailable
}
const title = (response.body.match(/<title[^>]*>([^<]+)<\/title>/)![1] || '').trim()
this.deezerAvailable = title !== 'Deezer will soon be available in your country.'
this.deezerAvailable = title !== 'Deezer will soon be available in your country.' ? 'yes' : 'no'
}
return this.deezerAvailable
}

2
webui

@ -1 +1 @@
Subproject commit fa7cde2f8f23bd0396e79c3cab9aae00fc697db4
Subproject commit d7e05adb2439b16d7423fd5a1c9eafa2fa816b48