mirror of
https://github.com/neosubhamoy/neodlp.git
synced 2025-12-20 06:39:34 +05:30
feat: added custom commands, per-download configs and other minor improvements
This commit is contained in:
@@ -43,6 +43,7 @@ export interface DownloadState {
|
||||
sponsorblock_remove: string | null;
|
||||
sponsorblock_mark: string | null;
|
||||
use_aria2: number;
|
||||
custom_command: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
@@ -79,6 +80,7 @@ export interface Download {
|
||||
sponsorblock_remove: string | null;
|
||||
sponsorblock_mark: string | null;
|
||||
use_aria2: number;
|
||||
custom_command: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,12 @@ export interface SettingsTable {
|
||||
value: string;
|
||||
}
|
||||
|
||||
export interface CustomCommand {
|
||||
id: string;
|
||||
label: string;
|
||||
args: string;
|
||||
}
|
||||
|
||||
export interface Settings {
|
||||
ytdlp_update_channel: string;
|
||||
ytdlp_auto_update: boolean;
|
||||
@@ -35,6 +41,15 @@ export interface Settings {
|
||||
use_aria2: boolean;
|
||||
use_force_internet_protocol: boolean;
|
||||
force_internet_protocol: string;
|
||||
use_custom_commands: boolean;
|
||||
custom_commands: CustomCommand[];
|
||||
// extension settings
|
||||
websocket_port: number;
|
||||
}
|
||||
|
||||
export interface DownloadConfiguration {
|
||||
output_format: string | null;
|
||||
embed_metadata: boolean | null;
|
||||
embed_thumbnail: boolean | null;
|
||||
custom_command: string | null;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { DownloadState } from "@/types/download";
|
||||
import { RawVideoInfo } from "@/types/video";
|
||||
import { Settings } from "@/types/settings";
|
||||
import { DownloadConfiguration, Settings } from "@/types/settings";
|
||||
import { KvStore } from "@/types/kvStore";
|
||||
import { Update } from "@tauri-apps/plugin-updater";
|
||||
import { Log } from "@/types/logs";
|
||||
@@ -37,22 +37,28 @@ export interface CurrentVideoMetadataStore {
|
||||
|
||||
export interface DownloaderPageStatesStore {
|
||||
activeDownloadModeTab: string;
|
||||
activeDownloadConfigurationTab: string;
|
||||
isStartingDownload: boolean;
|
||||
selectedDownloadFormat: string;
|
||||
selectedCombinableVideoFormat: string;
|
||||
selectedCombinableAudioFormat: string;
|
||||
selectedSubtitles: string[];
|
||||
selectedPlaylistVideoIndex: string;
|
||||
downloadConfiguration: DownloadConfiguration;
|
||||
isErrored: boolean;
|
||||
isErrorExpected: boolean;
|
||||
erroredDownloadId: string | null;
|
||||
setActiveDownloadModeTab: (tab: string) => void;
|
||||
setActiveDownloadConfigurationTab: (tab: string) => void;
|
||||
setIsStartingDownload: (isStarting: boolean) => void;
|
||||
setSelectedDownloadFormat: (format: string) => void;
|
||||
setSelectedCombinableVideoFormat: (format: string) => void;
|
||||
setSelectedCombinableAudioFormat: (format: string) => void;
|
||||
setSelectedSubtitles: (subtitles: string[]) => void;
|
||||
setSelectedPlaylistVideoIndex: (index: string) => void;
|
||||
setDownloadConfigurationKey: (key: string, value: unknown) => void;
|
||||
setDownloadConfiguration: (config: DownloadConfiguration) => void;
|
||||
resetDownloadConfiguration: () => void;
|
||||
setIsErrored: (isErrored: boolean) => void;
|
||||
setIsErrorExpected: (isErrorExpected: boolean) => void;
|
||||
setErroredDownloadId: (downloadId: string | null) => void;
|
||||
|
||||
Reference in New Issue
Block a user