mirror of https://github.com/VERT-sh/VERT.git
refactor: move converters into its own folders
This commit is contained in:
parent
8850b25f8b
commit
789637d263
|
|
@ -10,7 +10,7 @@
|
|||
</script>
|
||||
|
||||
<script lang="ts">
|
||||
import { vertdFetch } from "$lib/converters/vertd.svelte";
|
||||
import { vertdFetch } from "$lib/converters/vertd/vertd.svelte";
|
||||
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
import { ToastManager, type ToastProps } from "$lib/util/toast.svelte";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { toArgs, animatedImageFormats } from "$lib/converters/ffmpeg.codecs";
|
||||
import { toArgs, animatedImageFormats } from "$lib/converters/ffmpeg/ffmpeg.codecs";
|
||||
import type { ConversionSettings } from "$lib/types/conversion-settings";
|
||||
import { videoFormats } from "./vertd.svelte";
|
||||
import { videoFormats } from "../vertd/vertd.svelte";
|
||||
|
||||
export function buildImageSequenceCommand(
|
||||
outputFormat: string,
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { VertFile } from "$lib/types";
|
||||
import { Converter, FormatInfo } from "./converter.svelte";
|
||||
import { Converter, FormatInfo } from "../converter.svelte";
|
||||
import { FFmpeg } from "@ffmpeg/ffmpeg";
|
||||
import { browser } from "$app/environment";
|
||||
import { error, log } from "$lib/util/logger";
|
||||
|
|
@ -18,7 +18,7 @@ import type {
|
|||
SettingDefinition,
|
||||
ConversionSettings,
|
||||
} from "$lib/types/conversion-settings";
|
||||
import { videoFormats } from "./vertd.svelte";
|
||||
import { videoFormats } from "../vertd/vertd.svelte";
|
||||
|
||||
// TODO: differentiate in UI? (not native formats)
|
||||
export class FFmpegConverter extends Converter {
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
import type { Categories } from "$lib/types";
|
||||
import type { Converter } from "./converter.svelte";
|
||||
import { FFmpegConverter } from "./ffmpeg.svelte";
|
||||
import { PandocConverter } from "./pandoc.svelte";
|
||||
import { VertdConverter } from "./vertd.svelte";
|
||||
import { MagickConverter } from "./magick.svelte";
|
||||
import { FFmpegConverter } from "./ffmpeg/ffmpeg.svelte";
|
||||
import { PandocConverter } from "./pandoc/pandoc.svelte";
|
||||
import { VertdConverter } from "./vertd/vertd.svelte";
|
||||
import { MagickConverter } from "./magick/magick.svelte";
|
||||
import { MediabunnyConverter } from "./mediabunny/mediabunny.svelte";
|
||||
import { DISABLE_ALL_EXTERNAL_REQUESTS } from "$lib/util/consts";
|
||||
import { MediabunnyConverter } from "./mediabunny.svelte";
|
||||
|
||||
// TODO: change this to include category with initialization to replace converterCategories and maybe categories as well
|
||||
const getConverters = (): Converter[] => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { FormatInfo } from "./converter.svelte";
|
||||
import { FormatInfo } from "../converter.svelte";
|
||||
|
||||
// formats added from maya's somewhat automated testing
|
||||
// placed into this file to easily differentiate (and also clean up the main magick file)
|
||||
|
|
@ -3,7 +3,7 @@ import { error, log } from "$lib/util/logger";
|
|||
import { m } from "$lib/paraglide/messages";
|
||||
import { VertFile, type WorkerMessage } from "$lib/types";
|
||||
import MagickWorker from "$lib/workers/magick?worker&url";
|
||||
import { Converter, FormatInfo } from "./converter.svelte";
|
||||
import { Converter, FormatInfo } from "../converter.svelte";
|
||||
import { imageFormats } from "./magick-automated";
|
||||
import { Settings } from "$lib/sections/settings/index.svelte";
|
||||
import magickWasm from "@imagemagick/magick-wasm/magick.wasm?url";
|
||||
|
|
@ -21,14 +21,14 @@ import {
|
|||
import { registerAc3Decoder, registerAc3Encoder } from "@mediabunny/ac3";
|
||||
import { registerMp3Encoder } from "@mediabunny/mp3-encoder";
|
||||
import { registerFlacEncoder } from "@mediabunny/flac-encoder";
|
||||
import { Converter, FormatInfo, type WorkerStatus } from "./converter.svelte";
|
||||
import { Converter, FormatInfo, type WorkerStatus } from "../converter.svelte";
|
||||
import { error, log } from "$lib/util/logger";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
import type {
|
||||
SettingDefinition,
|
||||
ConversionSettings,
|
||||
} from "$lib/types/conversion-settings";
|
||||
import { CONVERSION_BITRATES, SAMPLE_RATES } from "./ffmpeg.codecs";
|
||||
import { CONVERSION_BITRATES, SAMPLE_RATES } from "../ffmpeg/ffmpeg.codecs";
|
||||
import { ToastManager } from "$lib/util/toast.svelte";
|
||||
import { browser } from "$app/environment";
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
import { VertFile, type WorkerMessage } from "$lib/types";
|
||||
import { Converter, FormatInfo } from "./converter.svelte";
|
||||
import { Converter, FormatInfo } from "../converter.svelte";
|
||||
import { browser } from "$app/environment";
|
||||
import PandocWorker from "$lib/workers/pandoc?worker&url";
|
||||
import { error, log } from "$lib/util/logger";
|
||||
|
|
@ -7,15 +7,15 @@ import {
|
|||
getVertdCustomHeaders,
|
||||
} from "$lib/sections/settings/vertdSettings.svelte";
|
||||
import { VertFile } from "$lib/types";
|
||||
import { Converter, FormatInfo } from "./converter.svelte";
|
||||
import { Converter, FormatInfo } from "../converter.svelte";
|
||||
import { PUB_DISABLE_FAILURE_BLOCKS } from "$env/static/public";
|
||||
import { ToastManager } from "$lib/util/toast.svelte";
|
||||
import { converters } from "./index";
|
||||
import { converters } from "../";
|
||||
import type {
|
||||
SettingDefinition,
|
||||
ConversionSettings,
|
||||
} from "$lib/types/conversion-settings";
|
||||
import { CONVERSION_BITRATES, SAMPLE_RATES } from "./ffmpeg.codecs";
|
||||
import { CONVERSION_BITRATES, SAMPLE_RATES } from "../ffmpeg/ffmpeg.codecs";
|
||||
import { formatBytes } from "$lib/util/file";
|
||||
|
||||
interface UploadResponse {
|
||||
|
|
@ -385,7 +385,6 @@ export class VertdConverter extends Converter {
|
|||
this.log("created converter");
|
||||
this.log("not rly sure how to implement this :P");
|
||||
this.status = "ready";
|
||||
this.log(JSON.stringify(this.supportedFormats, null, 2));
|
||||
}
|
||||
|
||||
private async getServerSizeLimit(apiUrl: string): Promise<number | null> {
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
type ConversionBitrate,
|
||||
SAMPLE_RATES,
|
||||
type SampleRate,
|
||||
} from "$lib/converters/ffmpeg.codecs";
|
||||
} from "$lib/converters/ffmpeg/ffmpeg.codecs";
|
||||
import { m } from "$lib/paraglide/messages";
|
||||
import Dropdown from "$lib/components/functional/Dropdown.svelte";
|
||||
import FancyInput from "$lib/components/functional/FancyInput.svelte";
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { PUB_VERTD_URL } from "$env/static/public";
|
||||
import type { ConversionBitrate } from "$lib/converters/ffmpeg.codecs";
|
||||
import type { ConversionSpeed } from "$lib/converters/vertd.svelte";
|
||||
import type { ConversionBitrate } from "$lib/converters/ffmpeg/ffmpeg.codecs";
|
||||
import type { ConversionSpeed } from "$lib/converters/vertd/vertd.svelte";
|
||||
import { readSettings } from "$lib/util/settings";
|
||||
import { VertdInstance } from "./vertdSettings.svelte";
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue