Commit Graph

17 Commits

Author SHA1 Message Date
607d311375 chapter extraction via ffprobe during library sync (#5)
ffprobe module in adapter-common: parse JSON output into Vec<Chapter>,
should_probe_chapters gate (movie OR >45min), graceful failure.
Add set_chapters/set_role setters to MediaItem.
2026-07-12 14:00:17 +02:00
abcf69ce7e extract background tasks into worker binary
Move auto_scheduler, library_sync, broadcast_poller, webhook_consumer
from presentation/background/ into crates/worker/src/jobs/.
Presentation is now a pure HTTP server.
2026-07-12 07:28:17 +02:00
826e824b58 replace tokio::broadcast event bus with SQLite-backed event queue (ADR-0003)
- DomainEvent: add Serialize/Deserialize
- EventConsumer port: poll_next/ack/nack replacing recv()
- EventEnvelope: wraps event with id/retry_count/created_at
- SqliteEventPublisher/SqliteEventConsumer: INSERT/poll/DLQ
- migration: event_queue + dead_letter_queue tables
- InMemoryEventBus: combined publisher+consumer test double
- NoopEventConsumer: test stub
- webhook_consumer: polls EventConsumer instead of broadcast::Receiver
- presentation+mcp wiring: create from SqlitePool
2026-07-12 07:23:21 +02:00
33b440d297 fix(presentation): extract 12 handler violations to use cases
- TokenService port + JwtTokenService adapter; login/refresh return LoginResult
- delete get_token (dup of login); create_tokens helper removed
- type UpdateChannelRequest schedule_config/recycle_policy (no serde_json::Value)
- update_settings returns updated Vec; handler calls one use case
- config use case in application::config; handler maps DTO only
- SyncStatusEntry moved to api-types w/ From<LibrarySyncLogEntry>
- trigger_sync: Conflict error, drop sync_trigger.send from handler
- UpsertProviderCommand.config accepts Value; serialization in use case
- get_current_broadcast returns BroadcastWithChannel; one call
- get_stream_url resolves broadcast internally; handler single call
2026-07-12 05:28:49 +02:00
9b18d3ff6d remove OIDC/Postgres, replace ApiError w/ AppError, move params to api-types 2026-07-12 05:14:17 +02:00
c869e9ab84 mcp: MCP server calling application use cases 2026-07-12 03:31:08 +02:00
56d742a74c presentation: HTTP server crate w/ handlers, routes, background tasks
Axum binary that wires all clean-arch crates together:
- AppState holds pre-built Deps structs (auth, channels, schedule, library, etc.)
- JWT extractors (CurrentUser, AdminUser, OptionalCurrentUser)
- Handlers delegate to application use cases, map to api-types DTOs
- Routes: auth, channels, schedule, library, admin, providers, config, iptv
- Background: auto-scheduler, broadcast poller, webhook consumer, library sync
- Factory builds everything from Config + DbPool
- SimpleProviderRegistry impl of IProviderRegistry trait
- NoopMediaProvider fallback
2026-07-12 03:23:20 +02:00
b93b14efe4 adapter-local-files: media provider, index, transcoder 2026-07-12 02:53:27 +02:00
e389e9e002 adapter-jellyfin: media provider 2026-07-12 02:47:13 +02:00
72ef9b9e1b adapter-auth: JWT, OIDC, password hashing 2026-07-12 02:44:16 +02:00
0fe80b545e adapter-postgres: all repository implementations 2026-07-12 02:39:56 +02:00
e8179d1f53 adapter-sqlite: all repo implementations + wire fn + migrations copy 2026-07-12 02:34:12 +02:00
1428f264bb adapter-common: shared DB mapping helpers 2026-07-12 02:26:42 +02:00
1410d3e6bb api-types: HTTP DTOs with utoipa OpenAPI derives 2026-07-12 02:20:41 +02:00
ef86a967cd application: schedule bounded context 2026-07-12 02:02:23 +02:00
2976600d12 application: auth bounded context (register, login) 2026-07-12 01:49:34 +02:00
3ff146615f scaffold workspace + domain crate (errors, ids, uuid_id macro) 2026-07-12 01:00:50 +02:00