mirror of
https://github.com/bbara04/Purefin.git
synced 2026-07-23 19:26:50 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user