Skip to content

Commit

Permalink
fix: the output path does not update when changing the selected exten…
Browse files Browse the repository at this point in the history
…sion (#252)
  • Loading branch information
TheNickOfTime authored Nov 15, 2024
1 parent 1f76b36 commit 7d28af3
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions client/src/components/overlays/create-job/create-job.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { useState } from 'react';
import { useOutletContext } from 'react-router-dom';
import { DirectoryItemType, DirectoryItemsType } from 'types/directory';
import { FileBrowserMode } from 'types/file-browser';
import { HandbrakeOutputExtensions } from 'types/file-extensions';
import { QueueRequestType } from 'types/queue';
import { PrimaryOutletContextType } from 'pages/primary/primary-context';
import ButtonGroup from 'components/base/inputs/button-group/button-group';
import ButtonInput from 'components/base/inputs/button/button-input';
import CheckboxInput from 'components/base/inputs/checkbox/checkbox-input';
import PathInput from 'components/base/inputs/path/path-input';
import SelectInput from 'components/base/inputs/select/select-input';
import TextInput from 'components/base/inputs/text/text-input';
import SectionOverlay from 'components/section/section-overlay';
import CheckboxInput from 'components/base/inputs/checkbox/checkbox-input';
import { FirstLetterUpperCase } from 'funcs/string.funcs';
import { PrimaryOutletContextType } from 'pages/primary/primary-context';
import { useState } from 'react';
import { useOutletContext } from 'react-router-dom';
import { DirectoryItemType, DirectoryItemsType } from 'types/directory';
import { FileBrowserMode } from 'types/file-browser';
import { HandbrakeOutputExtensions } from 'types/file-extensions';
import { QueueRequestType } from 'types/queue';
import {
FilterVideoFiles,
GetOutputItemsFromInputItems,
RequestDirectory,
} from './create-job-funcs';
import './create-job.scss';
import { FirstLetterUpperCase } from 'funcs/string.funcs';

type Params = {
onClose: () => void;
Expand Down Expand Up @@ -251,7 +251,9 @@ export default function CreateJob({ onClose }: Params) {
setOutputChanged(true);
const newOutputFiles = [...outputFiles];
newOutputFiles.map((file) => {
const oldExtension = file.extension!;
file.extension = extension;
file.path = file.path.replace(oldExtension, extension);
return file;
});

Expand Down

0 comments on commit 7d28af3

Please sign in to comment.