Admin Media Management Support#148
Merged
Merged
Conversation
This commit introduces a comprehensive suite of administrative features for managing media items. Users with administrator privileges can now edit metadata, identify media using external providers, and manage artwork directly from the item detail screens. ### Key Changes: * **Administrative UI**: Added `EditMetadataScreen` for field-level editing (title, overview, genres, cast), `IdentifyScreen` for provider matching, and `EditImagesScreen` for local/remote artwork management. * **Data Layer**: Implemented `AdminRepository` and `JellyfinAdminRepository` to interface with Jellyfin management APIs for metadata updates and image manipulation. * **Synchronization**: Introduced `AdminChangeBroadcaster` to facilitate real-time UI refreshes across the app when administrative changes occur. * **Integration**: Updated `ItemDetailScreen`, `ActionButtonsRow`, and navigation logic to conditionally display management options based on user permissions. * **Resources**: Added new icons and drawables for administrative actions, including image search and metadata editing.
This commit integrates `AdminChangeBroadcaster` into several core ViewModels to ensure that the UI automatically refreshes when administrative changes occur. Each affected ViewModel now collects the `itemChanged` flow within its `viewModelScope` to trigger a reload of its respective data. ### Key Changes: * **`GenreResultsViewModel`**: Injected `AdminChangeBroadcaster` and updated the UI to call `reloadGenre` when an item change is broadcasted. * **`WatchlistViewModel`**: Now listens for administrative changes to trigger `loadWatchlist`. * **`LibraryContentViewModel`**: Now listens for administrative changes to trigger `loadItems`. * **`FavoritesViewModel`**: Now listens for administrative changes to trigger `loadFavorites`. * **`PersonViewModel`**: Now listens for administrative changes to trigger `loadPersonDetails`.
This commit replaces hardcoded text across the admin management screens with string resources. This improves maintainability and prepares the administration features for localization. ### Key Changes: * **`strings.xml`**: Added a comprehensive set of string resources for the "Identify," "Edit Metadata," "Edit Images," and "Refresh Metadata" screens, including labels, button text, and content descriptions. * **Admin Screens**: Updated `IdentifyScreen.kt`, `EditMetadataScreen.kt`, `EditImagesScreen.kt`, and `RefreshMetadataDialog.kt` to use `stringResource()` for all UI text. * **Shared Components**: Refactored admin-related menus in `ActionButtonsRow.kt` and `EpisodeDetailOverlay.kt` to use string resources for menu items and accessibility labels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a comprehensive suite of administrative features for managing media items. Users with administrator privileges can now edit metadata, identify media using external providers, and manage artwork directly from the item detail screens.
Key Changes:
EditMetadataScreenfor field-level editing (title, overview, genres, cast),IdentifyScreenfor provider matching, andEditImagesScreenfor local/remote artwork management.AdminRepositoryandJellyfinAdminRepositoryto interface with Jellyfin management APIs for metadata updates and image manipulation.AdminChangeBroadcasterto facilitate real-time UI refreshes across the app when administrative changes occur.ItemDetailScreen,ActionButtonsRow, and navigation logic to conditionally display management options based on user permissions.