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

refactor: added errored state and improved error detection

This commit is contained in:
2025-12-19 10:30:45 +05:30
Verified
parent c1c2384c78
commit da806b21e9
6 changed files with 177 additions and 83 deletions

View File

@@ -45,9 +45,8 @@ export interface DownloaderPageStatesStore {
selectedSubtitles: string[];
selectedPlaylistVideoIndex: string;
downloadConfiguration: DownloadConfiguration;
isErrored: boolean;
isErrorExpected: boolean;
erroredDownloadId: string | null;
erroredDownloadIds: Set<string>;
expectedErrorDownloadIds: Set<string>;
videoPanelSizes: number[];
playlistPanelSizes: number[];
setActiveDownloadModeTab: (tab: string) => void;
@@ -61,9 +60,11 @@ export interface DownloaderPageStatesStore {
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;
addErroredDownload: (downloadId: string) => void;
removeErroredDownload: (downloadId: string) => void;
addExpectedErrorDownload: (downloadId: string) => void;
removeExpectedErrorDownload: (downloadId: string) => void;
clearErrorStates: () => void;
setVideoPanelSizes: (sizes: number[]) => void;
setPlaylistPanelSizes: (sizes: number[]) => void;
}