修复播放器文件夹访问失败 和 获取 prepared 导致原 file.filesize 更新

This commit is contained in:
2021-05-25 13:54:44 +08:00
parent c5c785fe27
commit e50cab447f

View File

@@ -536,7 +536,7 @@ const component_audio_player = {
this.$router.push({ this.$router.push({
path: '/search_folders', path: '/search_folders',
query: { query: {
folder_id: this.this_file.folder_id, folder_id: this.file.folder_id,
} }
}) })
}, },
@@ -555,7 +555,6 @@ const component_audio_player = {
this.is_preparing = false this.is_preparing = false
var file = this.file var file = this.file
file.play_back_type = 'cached_stream' file.play_back_type = 'cached_stream'
file.filesize = response.data.filesize
this.playing_file = file this.playing_file = file
}) })
}, },
@@ -583,6 +582,9 @@ const component_audio_player = {
return 'Preparing...' return 'Preparing...'
} }
let filesize = this.playing_file.filesize let filesize = this.playing_file.filesize
if (this.prepare) {
filesize = this.prepared_filesize
}
if (filesize < 1024 * 1024) { if (filesize < 1024 * 1024) {
return filesize return filesize
} }