jbilcke-hf HF staff commited on
Commit
f28a151
1 Parent(s): 89425e6
Files changed (1) hide show
  1. src/updatePlaylists.mts +6 -4
src/updatePlaylists.mts CHANGED
@@ -64,11 +64,13 @@ export const updatePlaylists = async (db: Database) => {
64
  const shotFilePathPattern = path.join(directoryPath, shotFileNamePattern)
65
 
66
  const files = await glob(shotFilePathPattern)
67
- const shotFilePath = files[0] // Get the first matching file
68
 
69
- // Add the file path to the categories
70
- for (const tag of sequence.tags) {
71
- categoryToFilePaths[tag].push(shotFilePath)
 
 
 
72
  }
73
  }
74
  }
 
64
  const shotFilePathPattern = path.join(directoryPath, shotFileNamePattern)
65
 
66
  const files = await glob(shotFilePathPattern)
 
67
 
68
+ for (const shotFilePath of files) {
69
+
70
+ // Add the file path to the categories
71
+ for (const tag of sequence.tags) {
72
+ categoryToFilePaths[tag].push(shotFilePath)
73
+ }
74
  }
75
  }
76
  }