fix: remove media conversion presets
This commit is contained in:
@@ -9,7 +9,6 @@ import { FormatSelector } from './FormatSelector';
|
||||
import { ConversionPreview } from './ConversionPreview';
|
||||
import { ConversionOptionsPanel } from './ConversionOptions';
|
||||
import { FileInfo } from './FileInfo';
|
||||
import { FormatPresets } from './FormatPresets';
|
||||
import { toast } from 'sonner';
|
||||
import {
|
||||
SUPPORTED_FORMATS,
|
||||
@@ -21,7 +20,6 @@ import { convertWithFFmpeg } from '@/lib/media/converters/ffmpegService';
|
||||
import { convertWithImageMagick } from '@/lib/media/converters/imagemagickService';
|
||||
import { addToHistory } from '@/lib/media/storage/history';
|
||||
import { downloadBlobsAsZip, generateOutputFilename } from '@/lib/media/utils/fileUtils';
|
||||
import { getPresetById, type FormatPreset } from '@/lib/media/utils/formatPresets';
|
||||
import type { ConversionJob, ConversionFormat, ConversionOptions } from '@/types/media';
|
||||
|
||||
export function FileConverter() {
|
||||
@@ -221,17 +219,6 @@ export function FileConverter() {
|
||||
setSelectedFiles((prev) => prev.filter((_, i) => i !== index));
|
||||
};
|
||||
|
||||
const handlePresetSelect = (preset: FormatPreset) => {
|
||||
// Find the output format that matches the preset
|
||||
const format = compatibleFormats.find(f => f.extension === preset.outputFormat);
|
||||
|
||||
if (format) {
|
||||
setOutputFormat(format);
|
||||
setConversionOptions(preset.options);
|
||||
toast.success(`Applied ${preset.name} preset`);
|
||||
}
|
||||
};
|
||||
|
||||
const handleDownloadAll = async () => {
|
||||
if (!outputFormat) return;
|
||||
|
||||
@@ -393,15 +380,6 @@ export function FileConverter() {
|
||||
<FileInfo file={selectedFiles[0]} format={inputFormat} />
|
||||
)}
|
||||
|
||||
{/* Format Presets */}
|
||||
{inputFormat && (
|
||||
<FormatPresets
|
||||
inputFormat={inputFormat}
|
||||
onPresetSelect={handlePresetSelect}
|
||||
disabled={isConverting}
|
||||
/>
|
||||
)}
|
||||
|
||||
{/* Format selection */}
|
||||
{inputFormat && compatibleFormats.length > 0 && (
|
||||
<div className="grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 items-start">
|
||||
|
||||
Reference in New Issue
Block a user