mirror of
https://github.com/mifi/lossless-cut.git
synced 2024-11-22 10:22:31 +01:00
add shortcut
- Include more tracks from other file
This commit is contained in:
parent
7173564c41
commit
eda009274e
26
src/App.jsx
26
src/App.jsx
@ -1899,6 +1899,17 @@ const App = memo(() => {
|
|||||||
electron.clipboard.writeText(await formatTsv(selectedSegments));
|
electron.clipboard.writeText(await formatTsv(selectedSegments));
|
||||||
}, [isFileOpened, selectedSegments]);
|
}, [isFileOpened, selectedSegments]);
|
||||||
|
|
||||||
|
const showIncludeExternalStreamsDialog = useCallback(async () => {
|
||||||
|
try {
|
||||||
|
const { canceled, filePaths } = await showOpenDialog({ properties: ['openFile'] });
|
||||||
|
if (canceled || filePaths.length < 1) return;
|
||||||
|
await addStreamSourceFile(filePaths[0]);
|
||||||
|
} catch (err) {
|
||||||
|
handleError(err);
|
||||||
|
}
|
||||||
|
}, [addStreamSourceFile]);
|
||||||
|
|
||||||
|
|
||||||
const mainActions = useMemo(() => {
|
const mainActions = useMemo(() => {
|
||||||
async function exportYouTube() {
|
async function exportYouTube() {
|
||||||
if (!checkFileOpened()) return;
|
if (!checkFileOpened()) return;
|
||||||
@ -2027,8 +2038,9 @@ const App = memo(() => {
|
|||||||
toggleWaveformMode,
|
toggleWaveformMode,
|
||||||
toggleShowThumbnails,
|
toggleShowThumbnails,
|
||||||
toggleShowKeyframes,
|
toggleShowKeyframes,
|
||||||
|
showIncludeExternalStreamsDialog,
|
||||||
};
|
};
|
||||||
}, [addSegment, alignSegmentTimesToKeyframes, apparentCutSegments, askStartTimeOffset, batchFileJump, batchOpenSelectedFile, captureSnapshot, captureSnapshotAsCoverArt, changePlaybackRate, checkFileOpened, cleanupFilesDialog, clearSegments, closeBatch, closeFileWithConfirm, combineOverlappingSegments, combineSelectedSegments, concatBatch, convertFormatBatch, copySegmentsToClipboard, createFixedDurationSegments, createNumSegments, createRandomSegments, createSegmentsFromKeyframes, currentSegIndexSafe, cutSegmentsHistory, deselectAllSegments, detectBlackScenes, detectSceneChanges, detectSilentScenes, duplicateCurrentSegment, extractAllStreams, extractCurrentSegmentFramesAsImages, extractSelectedSegmentsFramesAsImages, fillSegmentsGaps, goToTimecode, handleShowStreamsSelectorClick, increaseRotation, invertAllSegments, invertSelectedSegments, jumpCutEnd, jumpCutStart, jumpSeg, jumpTimelineEnd, jumpTimelineStart, keyboardNormalSeekSpeed, keyboardSeekAccFactor, onExportPress, onLabelSegment, openFilesDialog, openSendReportDialogWithState, pause, play, removeCutSegment, removeSelectedSegments, reorderSegsByStartTime, seekClosestKeyframe, seekRel, seekRelPercent, selectAllSegments, selectOnlyCurrentSegment, setCutEnd, setCutStart, setPlaybackVolume, shiftAllSegmentTimes, shortStep, shuffleSegments, splitCurrentSegment, timelineToggleComfortZoom, toggleCaptureFormat, toggleCurrentSegmentSelected, toggleKeyboardShortcuts, toggleKeyframeCut, toggleShowKeyframes, toggleLastCommands, toggleLoopSelectedSegments, togglePlay, toggleSegmentsList, toggleSettings, toggleShowThumbnails, toggleStreamsSelector, toggleStripAudio, toggleWaveformMode, tryFixInvalidDuration, userHtml5ifyCurrentFile, zoomRel]);
|
}, [addSegment, alignSegmentTimesToKeyframes, apparentCutSegments, askStartTimeOffset, batchFileJump, batchOpenSelectedFile, captureSnapshot, captureSnapshotAsCoverArt, changePlaybackRate, checkFileOpened, cleanupFilesDialog, clearSegments, closeBatch, closeFileWithConfirm, combineOverlappingSegments, combineSelectedSegments, concatBatch, convertFormatBatch, copySegmentsToClipboard, createFixedDurationSegments, createNumSegments, createRandomSegments, createSegmentsFromKeyframes, currentSegIndexSafe, cutSegmentsHistory, deselectAllSegments, detectBlackScenes, detectSceneChanges, detectSilentScenes, duplicateCurrentSegment, extractAllStreams, extractCurrentSegmentFramesAsImages, extractSelectedSegmentsFramesAsImages, fillSegmentsGaps, goToTimecode, handleShowStreamsSelectorClick, increaseRotation, invertAllSegments, invertSelectedSegments, jumpCutEnd, jumpCutStart, jumpSeg, jumpTimelineEnd, jumpTimelineStart, keyboardNormalSeekSpeed, keyboardSeekAccFactor, onExportPress, onLabelSegment, openFilesDialog, openSendReportDialogWithState, pause, play, removeCutSegment, removeSelectedSegments, reorderSegsByStartTime, seekClosestKeyframe, seekRel, seekRelPercent, selectAllSegments, selectOnlyCurrentSegment, setCutEnd, setCutStart, setPlaybackVolume, shiftAllSegmentTimes, shortStep, showIncludeExternalStreamsDialog, shuffleSegments, splitCurrentSegment, timelineToggleComfortZoom, toggleCaptureFormat, toggleCurrentSegmentSelected, toggleKeyboardShortcuts, toggleKeyframeCut, toggleLastCommands, toggleLoopSelectedSegments, togglePlay, toggleSegmentsList, toggleSettings, toggleShowKeyframes, toggleShowThumbnails, toggleStreamsSelector, toggleStripAudio, toggleWaveformMode, tryFixInvalidDuration, userHtml5ifyCurrentFile, zoomRel]);
|
||||||
|
|
||||||
const getKeyboardAction = useCallback((action) => mainActions[action], [mainActions]);
|
const getKeyboardAction = useCallback((action) => mainActions[action], [mainActions]);
|
||||||
|
|
||||||
@ -2228,16 +2240,6 @@ const App = memo(() => {
|
|||||||
};
|
};
|
||||||
}, [checkFileOpened, customOutDir, detectedFps, filePath, getFrameCount, getKeyboardAction, loadCutSegments, mainActions, selectedSegments, userOpenFiles]);
|
}, [checkFileOpened, customOutDir, detectedFps, filePath, getFrameCount, getKeyboardAction, loadCutSegments, mainActions, selectedSegments, userOpenFiles]);
|
||||||
|
|
||||||
const showAddStreamSourceDialog = useCallback(async () => {
|
|
||||||
try {
|
|
||||||
const { canceled, filePaths } = await showOpenDialog({ properties: ['openFile'] });
|
|
||||||
if (canceled || filePaths.length < 1) return;
|
|
||||||
await addStreamSourceFile(filePaths[0]);
|
|
||||||
} catch (err) {
|
|
||||||
handleError(err);
|
|
||||||
}
|
|
||||||
}, [addStreamSourceFile]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
async function onDrop(ev) {
|
async function onDrop(ev) {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
@ -2522,7 +2524,7 @@ const App = memo(() => {
|
|||||||
allFilesMeta={allFilesMeta}
|
allFilesMeta={allFilesMeta}
|
||||||
externalFilesMeta={externalFilesMeta}
|
externalFilesMeta={externalFilesMeta}
|
||||||
setExternalFilesMeta={setExternalFilesMeta}
|
setExternalFilesMeta={setExternalFilesMeta}
|
||||||
showAddStreamSourceDialog={showAddStreamSourceDialog}
|
showAddStreamSourceDialog={showIncludeExternalStreamsDialog}
|
||||||
mainFileStreams={mainStreams}
|
mainFileStreams={mainStreams}
|
||||||
isCopyingStreamId={isCopyingStreamId}
|
isCopyingStreamId={isCopyingStreamId}
|
||||||
toggleCopyStreamId={toggleCopyStreamId}
|
toggleCopyStreamId={toggleCopyStreamId}
|
||||||
|
@ -416,6 +416,10 @@ const KeyboardShortcuts = memo(({
|
|||||||
name: t('Edit tracks / metadata tags'),
|
name: t('Edit tracks / metadata tags'),
|
||||||
category: streamsCategory,
|
category: streamsCategory,
|
||||||
},
|
},
|
||||||
|
showIncludeExternalStreamsDialog: {
|
||||||
|
name: t('Include more tracks from other file'),
|
||||||
|
category: streamsCategory,
|
||||||
|
},
|
||||||
|
|
||||||
// zoomOperationsCategory
|
// zoomOperationsCategory
|
||||||
timelineZoomIn: {
|
timelineZoomIn: {
|
||||||
|
Loading…
Reference in New Issue
Block a user