refactor(media): remove LocalMediaUpdater interface in favor of MediaMetadataUpdater

Make LocalMediaRepository extend MediaMetadataUpdater directly instead of the
now-removed LocalMediaUpdater, eliminating the redundant intermediate interface.
Add no-op updatePlaybackPosition stubs to all LocalMediaRepository implementations
since server-side position tracking belongs in the remote layer of the composite.

JellyfinMediaMetadataUpdaterImpl continues to act as the composite that combines
LocalMediaRepository (local cache) with JellyfinApiClient (remote server) under
the single MediaMetadataUpdater contract.
This commit is contained in:
2026-06-12 18:40:22 +00:00
parent e78a3700a6
commit 8d74d0c5df
6 changed files with 29 additions and 14 deletions

View File

@@ -214,6 +214,14 @@ class InMemoryLocalMediaRepository @Inject constructor(
}
}
override suspend fun updatePlaybackPosition(
mediaId: UUID,
playbackPositionTicks: Long,
runtimeTicks: Long,
) {
// Server-side operation — not persisted locally
}
private fun updateLoadedSeriesEpisode(updatedEpisode: Episode) {
seriesState.update { current ->
val series = current[updatedEpisode.seriesId] ?: return@update current

View File

@@ -71,6 +71,14 @@ class OfflineLocalMediaRepository @Inject constructor(
// Do nothing
}
override suspend fun updatePlaybackPosition(
mediaId: UUID,
playbackPositionTicks: Long,
runtimeTicks: Long,
) {
// Server-side operation — not persisted offline
}
override suspend fun saveMovies(movies: List<Movie>) {
localDataSource.saveMovies(movies)
}