show error failed at prepare (fix)

This commit is contained in:
2021-05-26 16:57:59 +08:00
parent ef9057651b
commit 8fc7a6cb10

View File

@@ -568,7 +568,6 @@ const component_audio_player = {
console.log(response.data)
this.error_status = ''
this.prepared_filesize = response.data.filesize
this.is_preparing = false
var file = this.file
this.playing_file = file
this.set_playing_url()
@@ -579,6 +578,8 @@ const component_audio_player = {
} else {
this.error_status = "Network error"
}
}).finally(() => {
this.is_preparing = false
})
},
set_playing_url() {
@@ -637,12 +638,12 @@ const component_audio_player = {
return this.error_status ? true : false
},
computed_readable_size() {
if (this.error_status) {
return this.error_status
}
if (this.is_preparing) {
return 'Preparing...'
}
if (this.error_status) {
return this.error_status
}
let filesize = this.playing_file.filesize
if (this.prepare) {
filesize = this.prepared_filesize