The swiss army knife of lossless video/audio editing
fixes
Mikael Finstad877bcdbdf221
diff --git a/src/App.jsx b/src/App.jsxindex 65063b0d..d585a06a 100644--- a/src/App.jsx+++ b/src/App.jsx@@ -1776,7 +1776,8 @@ const App = memo(() => {[lastOpenedPath] = filePaths;- if (filePaths.length === 1 && basename(filePaths[0]) === 'VIDEO_TS') {+ // https://en.wikibooks.org/wiki/Inside_DVD-Video/Directory_Structure+ if (filePaths.length === 1 && /^VIDEO_TS$/i.test(basename(filePaths[0]))) {if (mustDisallowVob()) return;filePaths = await readVideoTs(filePaths[0]);}diff --git a/src/util.js b/src/util.jsindex 75a7ee03..e9f9b00a 100644--- a/src/util.js+++ b/src/util.js@@ -365,7 +365,8 @@ export function mustDisallowVob() {export async function readVideoTs(videoTsPath) {const files = await readdir(videoTsPath);- const relevantFiles = files.filter((file) => /VTS_\d+_\d+\.vob/i.test(file) && !/VTS_\d+_00\.vob/i.test(file)); // skip menu+ const relevantFiles = files.filter((file) => /^VTS_\d+_\d+\.vob$/i.test(file) && !/^VTS_\d+_00\.vob$/i.test(file)); // skip menuconst ret = sortBy(relevantFiles).map((file) => join(videoTsPath, file));if (ret.length === 0) throw new Error('No VTS vob files found in folder');+ return ret;}