pull/1723/head
Mikael Finstad 2023-09-21 21:56:22 +08:00
rodzic 0d8d7b9428
commit 877bcdbdf2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
2 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -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]);
}

Wyświetl plik

@ -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;
}