Phase 5 abgeschlossen

- SQLite-Setup: `src/main/store/db.ts` (better-sqlite3, Migration)
- Lokaler VOD-Verlauf (Resume)
- mpv `time-pos`-Observer schreibt alle ~5s in DB
- Auto-Resume: beim VOD-Start Position aus DB lesen → `--start=<s>`
 -Resume-Indikator auf VOD-Karte
 - Completed-Indikator (dunkles Overlay + Checkmark)
This commit is contained in:
Andre
2026-04-08 20:05:24 +02:00
parent ed1f710866
commit 2cd5e2fb0c
15 changed files with 1602 additions and 531 deletions
+8 -1
View File
@@ -3,6 +3,7 @@ import type { AuthEvent, AuthService } from '../auth/authService'
import type { HelixClient } from '../twitch/helixClient'
import type { PlaybackService } from '../playback/playbackService'
import type { PlaybackEvent } from '../playback/types'
import { getProgressMap } from '../store/historyRepo'
export const IPC = {
authStatus: 'auth:get-status',
@@ -15,6 +16,7 @@ export const IPC = {
twitchGetFollowed: 'twitch:get-followed',
twitchGetVideos: 'twitch:get-videos',
historyGetProgress: 'history:get-progress',
playbackStartLive: 'playback:start-live',
playbackStartVod: 'playback:start-vod',
@@ -47,6 +49,10 @@ export function registerIpcHandlers(
IPC.twitchGetVideos,
(_e, broadcasterId: string) => helix.getVideos(broadcasterId)
)
ipcMain.handle(
IPC.historyGetProgress,
(_e, vodIds: string[]) => getProgressMap(vodIds)
)
ipcMain.handle(
IPC.playbackStartLive,
@@ -54,7 +60,8 @@ export function registerIpcHandlers(
)
ipcMain.handle(
IPC.playbackStartVod,
(_e, vodId: string, startSeconds?: number) => playback.startVod(vodId, startSeconds)
(_e, vodId: string, channelLogin: string, title: string, durationSeconds: number) =>
playback.startVod(vodId, channelLogin, title, durationSeconds)
)
ipcMain.handle(IPC.playbackStop, () => playback.stop())