diff --git a/apps/electron-backend/src/app/api/main.preload.ts b/apps/electron-backend/src/app/api/main.preload.ts index b07746125..a0cbd559b 100644 --- a/apps/electron-backend/src/app/api/main.preload.ts +++ b/apps/electron-backend/src/app/api/main.preload.ts @@ -482,13 +482,34 @@ const electronApi = { ), dbGetGlobalRecentlyAdded: ( kind: 'all' | 'vod' | 'series', - limit?: number - ) => ipcRenderer.invoke('DB_GET_GLOBAL_RECENTLY_ADDED', kind, limit), + limit?: number, + playlistType?: + | 'xtream' + | 'stalker' + | 'm3u-file' + | 'm3u-text' + | 'm3u-url' + ) => + ipcRenderer.invoke( + 'DB_GET_GLOBAL_RECENTLY_ADDED', + kind, + limit, + playlistType + ), dbGetRecentlyViewed: () => ipcRenderer.invoke('DB_GET_RECENTLY_VIEWED'), dbClearRecentlyViewed: () => ipcRenderer.invoke('DB_CLEAR_RECENTLY_VIEWED'), // Favorites - dbAddFavorite: (contentId: number, playlistId: string) => - ipcRenderer.invoke('DB_ADD_FAVORITE', contentId, playlistId), + dbAddFavorite: ( + contentId: number, + playlistId: string, + backdropUrl?: string + ) => + ipcRenderer.invoke( + 'DB_ADD_FAVORITE', + contentId, + playlistId, + backdropUrl + ), dbRemoveFavorite: (contentId: number, playlistId: string) => ipcRenderer.invoke('DB_REMOVE_FAVORITE', contentId, playlistId), dbIsFavorite: (contentId: number, playlistId: string) => @@ -504,8 +525,17 @@ const electronApi = { // Recently viewed (playlist-specific) dbGetRecentItems: (playlistId: string) => ipcRenderer.invoke('DB_GET_RECENT_ITEMS', playlistId), - dbAddRecentItem: (contentId: number, playlistId: string) => - ipcRenderer.invoke('DB_ADD_RECENT_ITEM', contentId, playlistId), + dbAddRecentItem: ( + contentId: number, + playlistId: string, + backdropUrl?: string + ) => + ipcRenderer.invoke( + 'DB_ADD_RECENT_ITEM', + contentId, + playlistId, + backdropUrl + ), dbClearPlaylistRecentItems: (playlistId: string) => ipcRenderer.invoke('DB_CLEAR_PLAYLIST_RECENT_ITEMS', playlistId), dbRemoveRecentItem: (contentId: number, playlistId: string) => @@ -521,6 +551,15 @@ const electronApi = { playlistId, contentType ), + dbSetContentBackdropIfMissing: ( + contentId: number, + backdropUrl?: string + ) => + ipcRenderer.invoke( + 'DB_SET_CONTENT_BACKDROP_IF_MISSING', + contentId, + backdropUrl + ), dbDeleteAllPlaylists: (operationId?: string) => ipcRenderer.invoke('DB_DELETE_ALL_PLAYLISTS', operationId), dbCancelOperation: (operationId: string) =>