Compare commits
2 Commits
336fc77c85
...
a7e189fef9
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a7e189fef9 | ||
|
|
dd08f33dc6 |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.39",
|
||||
"version": "4.6.40",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.39",
|
||||
"version": "4.6.40",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.6.0",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "twitch-vod-manager",
|
||||
"version": "4.6.39",
|
||||
"version": "4.6.40",
|
||||
"description": "Twitch VOD Manager - Download Twitch VODs easily",
|
||||
"main": "dist/main.js",
|
||||
"author": "xRangerDE",
|
||||
|
||||
11
src/main.ts
11
src/main.ts
@ -3770,10 +3770,13 @@ async function runLiveStatusBatchPoll(): Promise<void> {
|
||||
}
|
||||
}
|
||||
|
||||
if (mainWindow) {
|
||||
const snapshot: Record<string, boolean> = {};
|
||||
for (const [k, v] of liveStatusByLogin.entries()) snapshot[k] = v;
|
||||
mainWindow.webContents.send('live-status-batch-update', { changes, snapshot });
|
||||
if (mainWindow && changes.length > 0) {
|
||||
// Renderer only consumes `changes` — initial state comes via
|
||||
// the get-live-status-snapshot IPC at boot. Don't ship the
|
||||
// full map on every tick (was ~1.5KB JSON per 60s with zero
|
||||
// consumer-side use). Also skip the broadcast entirely when
|
||||
// nothing actually changed.
|
||||
mainWindow.webContents.send('live-status-batch-update', { changes });
|
||||
}
|
||||
} catch (e) {
|
||||
appendDebugLog('live-status-poll-failed', String(e));
|
||||
|
||||
@ -94,7 +94,7 @@ contextBridge.exposeInMainWorld('api', {
|
||||
getStreamerProfile: (login: string, forceRefresh?: boolean) => ipcRenderer.invoke('get-streamer-profile', login, forceRefresh),
|
||||
getVodStoryboard: (vodId: string) => ipcRenderer.invoke('get-vod-storyboard', vodId),
|
||||
getLiveStatusSnapshot: () => ipcRenderer.invoke('get-live-status-snapshot'),
|
||||
onLiveStatusBatchUpdate: (callback: (info: { changes: Array<{ login: string; isLive: boolean }>; snapshot: Record<string, boolean> }) => void) => {
|
||||
onLiveStatusBatchUpdate: (callback: (info: { changes: Array<{ login: string; isLive: boolean }> }) => void) => {
|
||||
ipcRenderer.on('live-status-batch-update', (_, info) => callback(info));
|
||||
},
|
||||
searchArchive: (filter: Record<string, unknown>) => ipcRenderer.invoke('search-archive', filter),
|
||||
|
||||
2
src/renderer-globals.d.ts
vendored
2
src/renderer-globals.d.ts
vendored
@ -347,7 +347,7 @@ interface ApiBridge {
|
||||
getStreamerProfile(login: string, forceRefresh?: boolean): Promise<StreamerProfile | null>;
|
||||
getVodStoryboard(vodId: string): Promise<VodStoryboard | null>;
|
||||
getLiveStatusSnapshot(): Promise<Record<string, boolean>>;
|
||||
onLiveStatusBatchUpdate(callback: (info: { changes: Array<{ login: string; isLive: boolean }>; snapshot: Record<string, boolean> }) => void): void;
|
||||
onLiveStatusBatchUpdate(callback: (info: { changes: Array<{ login: string; isLive: boolean }> }) => void): void;
|
||||
searchArchive(filter: {
|
||||
query?: string;
|
||||
type?: 'all' | 'live' | 'vod' | 'chat' | 'events';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user