pull/2801/head
Mikael Finstad 5 months ago
parent 2603017e84
commit 260301c920
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

@ -21,3 +21,7 @@ See more examples in-app.
You can also use JavaScript expressions when referring to variables inside `${}` in output file name templates, e.g. `${FILENAME.toLowerCase()}`.
See also [Export file name template](file-name-template.md).
## Select tracks by expression
For available variables, open the *Tracks* dialog, then for the respective track, open *Track info* and you will see all available variables which you can use in your filter.

@ -14,4 +14,5 @@ export const troubleshootingUrl = 'https://mifi.no/losslesscut/troubleshooting';
export const exportedFileNameTemplateHelpUrl = 'https://mifi.no/losslesscut/file-name-template';
export const selectSegmentByExpressionHelpUrl = 'https://mifi.no/losslesscut/select-segments-by-expression';
export const editSegmentByExpressionHelpUrl = 'https://mifi.no/losslesscut/edit-segments-by-expression';
export const changeEnabledStreamsExpressionHelpUrl = 'https://mifi.no/losslesscut/select-tracks-by-expression';
export const supportEmail = 'losslesscut@mifi.no';

@ -12,6 +12,10 @@ import i18n from '../i18n';
import Action from '../components/Action';
import ExpressionDialog from '../components/ExpressionDialog';
import type { ShowGenericDialog } from '../components/GenericDialog';
import { changeEnabledStreamsExpressionHelpUrl } from '../../../common/constants';
const remote = window.require('@electron/remote');
const { shell } = remote;
export default function useStreamsMeta({ mainStreams, externalFilesMeta, filePath, autoExportExtraStreams, showGenericDialog }: {
@ -128,7 +132,7 @@ export default function useStreamsMeta({ mainStreams, externalFilesMeta, filePat
{ name: i18n.t('1st, 2nd and 3rd track'), code: 'track.index >= 0 && track.index <= 2' },
]}
title={i18n.t('Toggle tracks by expression')}
description={<Trans>Enter a JavaScript filter expression which will be evaluated for each track of the current file. Tracks for which the expression evaluates to &quot;true&quot; will be selected or deselected. You may also the <Action name="toggleStripCurrentFilter" /> keyboard action to run this filter.</Trans>}
description={<><Trans>Enter a JavaScript filter expression which will be evaluated for each track of the current file. Tracks for which the expression evaluates to &quot;true&quot; will be selected or deselected. You may also the <Action name="toggleStripCurrentFilter" /> keyboard action to run this filter.</Trans> <button type="button" className="link-button" onClick={() => shell.openExternal(changeEnabledStreamsExpressionHelpUrl)}>View available syntax.</button></>}
inputValue={enabledStreamsFilter ?? ''}
/>
),

Loading…
Cancel
Save