Added deezer unreachable differentiation to the vpn warning
This commit is contained in:
@@ -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
2
webui
Submodule webui updated: fa7cde2f8f...d7e05adb24
Reference in New Issue
Block a user