1
1
mirror of https://github.com/neosubhamoy/neodlp.git synced 2026-02-05 06:22:23 +05:30

(chore): initial MVP release v0.1.0

This commit is contained in:
2025-04-28 23:49:42 +05:30
Verified
commit c73022b1a2
200 changed files with 24562 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
import { DownloadState } from '@/types/download';
import { RawVideoInfo } from '@/types/video';
import { createContext, useContext } from 'react';
interface AppContextType {
fetchVideoMetadata: (url: string, formatId?: string) => Promise<RawVideoInfo | null>;
startDownload: (url: string, selectedFormat: string, selectedSubtitles?: string | null, resumeState?: DownloadState, playlistItems?: string) => Promise<void>;
pauseDownload: (state: DownloadState) => Promise<void>;
resumeDownload: (state: DownloadState) => Promise<void>;
cancelDownload: (state: DownloadState) => Promise<void>;
}
export const AppContext = createContext<AppContextType>({
fetchVideoMetadata: async () => (null),
startDownload: async () => {},
pauseDownload: async () => {},
resumeDownload: async () => {},
cancelDownload: async () => {}
});
export const useAppContext = () => useContext(AppContext);