Compare commits

..

No commits in common. "a7e189fef925a23ce642024e30b5f16ae36712c1" and "336fc77c85b72bcc901e96ee2c07a1c59eba82e8" have entirely different histories.

5 changed files with 9 additions and 12 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "twitch-vod-manager",
"version": "4.6.40",
"version": "4.6.39",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "twitch-vod-manager",
"version": "4.6.40",
"version": "4.6.39",
"license": "MIT",
"dependencies": {
"axios": "^1.6.0",

View File

@ -1,6 +1,6 @@
{
"name": "twitch-vod-manager",
"version": "4.6.40",
"version": "4.6.39",
"description": "Twitch VOD Manager - Download Twitch VODs easily",
"main": "dist/main.js",
"author": "xRangerDE",

View File

@ -3770,13 +3770,10 @@ async function runLiveStatusBatchPoll(): Promise<void> {
}
}
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 });
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 });
}
} catch (e) {
appendDebugLog('live-status-poll-failed', String(e));

View File

@ -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 }> }) => void) => {
onLiveStatusBatchUpdate: (callback: (info: { changes: Array<{ login: string; isLive: boolean }>; snapshot: Record<string, boolean> }) => void) => {
ipcRenderer.on('live-status-batch-update', (_, info) => callback(info));
},
searchArchive: (filter: Record<string, unknown>) => ipcRenderer.invoke('search-archive', filter),

View File

@ -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 }> }) => void): void;
onLiveStatusBatchUpdate(callback: (info: { changes: Array<{ login: string; isLive: boolean }>; snapshot: Record<string, boolean> }) => void): void;
searchArchive(filter: {
query?: string;
type?: 'all' | 'live' | 'vod' | 'chat' | 'events';