mirror of
https://github.com/4gray/iptvnator.git
synced 2026-10-08 09:01:03 -08:00
feat(types): enhance ElectronDbOperationEvent interface and add optional operationId to relevant database methods
This commit is contained in:
1 parent
34eca1d495
commit
c62ee4ae45
4 files changed
+50
-6
No files matched your search
Vendored
+35
-5
@@ -9,6 +9,18 @@ declare module 'video.js' {
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface ElectronDbOperationEvent {
|
||||
operationId?: string;
|
||||
operation: string;
|
||||
playlistId?: string;
|
||||
status: 'started' | 'progress' | 'completed' | 'cancelled' | 'error';
|
||||
phase?: string;
|
||||
current?: number;
|
||||
total?: number;
|
||||
increment?: number;
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface Window {
|
||||
electron: {
|
||||
getAppVersion: () => Promise<string>;
|
||||
@@ -118,9 +130,13 @@ declare global {
|
||||
updates: any
|
||||
) => Promise<{ success: boolean }>;
|
||||
dbDeletePlaylist: (
|
||||
playlistId: string
|
||||
playlistId: string,
|
||||
operationId?: string
|
||||
) => Promise<{ success: boolean }>;
|
||||
dbDeleteXtreamContent: (playlistId: string) => Promise<{
|
||||
dbDeleteXtreamContent: (
|
||||
playlistId: string,
|
||||
operationId?: string
|
||||
) => Promise<{
|
||||
success: boolean;
|
||||
favoritedXtreamIds: number[];
|
||||
recentlyViewedXtreamIds: {
|
||||
@@ -138,7 +154,8 @@ declare global {
|
||||
recentlyViewedXtreamIds: {
|
||||
xtreamId: number;
|
||||
viewedAt: string;
|
||||
}[]
|
||||
}[],
|
||||
operationId?: string
|
||||
) => Promise<{ success: boolean }>;
|
||||
dbHasCategories: (
|
||||
playlistId: string,
|
||||
@@ -170,7 +187,8 @@ declare global {
|
||||
dbSaveContent: (
|
||||
playlistId: string,
|
||||
streams: any[],
|
||||
type: string
|
||||
type: string,
|
||||
operationId?: string
|
||||
) => Promise<{ success: boolean; count: number }>;
|
||||
dbSearchContent: (
|
||||
playlistId: string,
|
||||
@@ -183,6 +201,10 @@ declare global {
|
||||
types: string[],
|
||||
excludeHidden?: boolean
|
||||
) => Promise<any[]>;
|
||||
dbGetGlobalRecentlyAdded: (
|
||||
kind: 'all' | 'vod' | 'series',
|
||||
limit?: number
|
||||
) => Promise<any[]>;
|
||||
dbGetRecentlyViewed: () => Promise<any[]>;
|
||||
dbClearRecentlyViewed: () => Promise<{ success: boolean }>;
|
||||
// Favorites
|
||||
@@ -275,7 +297,15 @@ declare global {
|
||||
callback: (count: number) => void
|
||||
) => void;
|
||||
removeDbSaveContentProgress: () => void;
|
||||
dbDeleteAllPlaylists: () => Promise<{ success: boolean }>;
|
||||
onDbOperationEvent?: (
|
||||
callback: (data: ElectronDbOperationEvent) => void
|
||||
) => () => void;
|
||||
dbDeleteAllPlaylists: (
|
||||
operationId?: string
|
||||
) => Promise<{ success: boolean }>;
|
||||
dbCancelOperation: (
|
||||
operationId: string
|
||||
) => Promise<{ success: boolean }>;
|
||||
// Playback positions
|
||||
dbSavePlaybackPosition: (
|
||||
playlistId: string,
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
"!{projectRoot}/test-setup.[jt]s"
|
||||
],
|
||||
"sharedGlobals": [
|
||||
"{workspaceRoot}/.github/workflows/ci.yml",
|
||||
"{workspaceRoot}/.github/workflows/ci.yml"
|
||||
]
|
||||
},
|
||||
|
||||
@@ -37,6 +37,12 @@
|
||||
"libs/playlist/shared/util/src/index.ts"
|
||||
],
|
||||
"@iptvnator/ui/epg": ["libs/ui/epg/src/index.ts"],
|
||||
"@iptvnator/ui/epg/progress-panel": [
|
||||
"libs/ui/epg/src/lib/epg-progress-panel/epg-progress-panel.component.ts"
|
||||
],
|
||||
"@iptvnator/ui/playback/external-player-info-dialog": [
|
||||
"libs/ui/playback/src/lib/external-player-info-dialog/external-player-info-dialog.component.ts"
|
||||
],
|
||||
"@iptvnator/ui/playback": ["libs/ui/playback/src/index.ts"],
|
||||
"@iptvnator/playlist/import/feature": [
|
||||
"libs/playlist/import/feature/src/index.ts"
|
||||
@@ -72,6 +78,12 @@
|
||||
"shared-portals": ["libs/ui/shared-portals/src/index.ts"],
|
||||
"remote-control": ["libs/ui/remote-control/src/index.ts"],
|
||||
"database": ["libs/shared/database/src/index.ts"],
|
||||
"database-schema": [
|
||||
"libs/shared/database/src/lib/schema.ts"
|
||||
],
|
||||
"database-path-utils": [
|
||||
"libs/shared/database/src/lib/path-utils.ts"
|
||||
],
|
||||
"workspace-dashboard-feature": [
|
||||
"libs/workspace/dashboard/feature/src/index.ts"
|
||||
],
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "./apps/web/tsconfig.spec.json"
|
||||
}
|
||||
Reference in new issue
Block a user