@mixvideo/cli
Advanced tools
+5
-1
@@ -19,7 +19,11 @@ #!/usr/bin/env node | ||
| } | ||
| var set = /* @__PURE__ */ new Set(); | ||
| async function getMaterialVideoByName(name) { | ||
| const files = await (0, import_promises.readdir)((0, import_path.join)(root, "videos")); | ||
| const file = files[Math.floor(Math.random() * files.length)]; | ||
| return (0, import_path.join)(root, "videos", file); | ||
| const used = (0, import_path.join)(root, "videos", file); | ||
| if (set.has(used)) return getMaterialVideoByName(name); | ||
| set.add(used); | ||
| return used; | ||
| } | ||
| main(); |
+5
-1
@@ -18,7 +18,11 @@ #!/usr/bin/env node | ||
| } | ||
| var set = /* @__PURE__ */ new Set(); | ||
| async function getMaterialVideoByName(name) { | ||
| const files = await readdir(join(root, "videos")); | ||
| const file = files[Math.floor(Math.random() * files.length)]; | ||
| return join(root, "videos", file); | ||
| const used = join(root, "videos", file); | ||
| if (set.has(used)) return getMaterialVideoByName(name); | ||
| set.add(used); | ||
| return used; | ||
| } | ||
| main(); |
+1
-1
| { | ||
| "name": "@mixvideo/cli", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", | ||
| "description": "Gemini AI API client library for MixVideo project", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
3022
9.65%54
17.39%