mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 02:12:30 +01:00
fixes
This commit is contained in:
parent
0d8d7b9428
commit
877bcdbdf2
@ -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]);
|
||||
}
|
||||
|
@ -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 menu
|
||||
const ret = sortBy(relevantFiles).map((file) => join(videoTsPath, file));
|
||||
if (ret.length === 0) throw new Error('No VTS vob files found in folder');
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user