Files
kodi-api-server/src/WatchState/watch-state.module.ts
T
Jurgis SakalauskasandClaude Opus 5.5 be7d0bc535 add shared watch state, continue watching and new main menu
- watch_state table: resume point, watched, play count, last played per file,
  shared by all clients (Kodi plugin, Android TV app)
- POST/GET /api/state/:fileId for players' progress reports (watched at 90% or
  on end; late resends carry `at` and lose to newer state)
- listings carry watch state (files: playcount, resume, lastplayed; shows and
  seasons: watched/total episodes), episodes sorted by season/episode
- all/continue: unfinished files and next episodes, latest activity first
- context menus: mark (un)watched for a file, season or show; hide from
  continue watching
- main menu: Continue watching, Movies, Shows, scans (Torr/LRT unlisted)
- DATA_ROOT env overrides /srv/data for local runs outside docker

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 10:01:39 +03:00

15 lines
568 B
TypeScript

import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { WatchStateEntity } from '../Shared/Entity/watch-state.entity';
import { FileEntity } from '../Shared/Entity/file.entity';
import { WatchStateService } from './watch-state.service';
import { WatchStateController } from './watch-state.controller';
@Module({
imports: [TypeOrmModule.forFeature([WatchStateEntity, FileEntity])],
controllers: [WatchStateController],
providers: [WatchStateService],
exports: [WatchStateService],
})
export class WatchStateModule {}