Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Simplify the code (no need for extra async function)
Signed-off-by: Frederic Ruget <[email protected]>
  • Loading branch information
douzebis authored and beardhatcode committed May 25, 2021
commit e1eacde290c4718b35132a1e4cc30622e979f288
8 changes: 1 addition & 7 deletions src/components/Videos.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,15 +134,9 @@ export default {
this.updateVideoSize()
},

async fetchFolder(dirPath) {
// Fetching the contents of the video folder must be asynchronous
const fileList = await getFileList(dirPath)
return fileList
},

fetchTracks() {
const dirPath = extractFilePaths(this.filename)[0]
this.fetchFolder(dirPath).then(folder => {
getFileList(dirPath).then(folder => {
// ISO code for languages
// See https://www.loc.gov/standards/iso639-2/php/code_list.php
const languages = {
Expand Down