KefinTweaks Watchlist, and Card Indicator Fixes#7
Merged
Conversation
… - Supports KefinTweaks Watchlist
This commit refactors the app's "Watchlist" feature, replacing the local, device-specific implementation with the server's built-in "Like" functionality. This change ensures that a user's watchlist is synchronized across all their devices and sessions.
The local `watchlist` database table and its corresponding `WatchlistDao` and `WatchlistItemEntity` have been completely removed. The app now leverages the `isLiked` filter and user data from the Jellyfin server API to manage and display liked items.
### Key Changes:
* **Data Models (`AfinityItem`, `AfinityMovie`, etc.):**
* A new `liked` boolean property has been added to the base `AfinityItem` interface and all implementing media models (`AfinityMovie`, `AfinityShow`, `AfinityEpisode`, etc.).
* This property is now populated from the `userData.likes` field returned by the Jellyfin API.
* **Repository Layer:**
* `WatchlistRepository` has been rewritten to use `UserDataRepository` and `MediaRepository` instead of a local DAO.
* `addToWatchlist` and `removeFromWatchlist` now call `userDataRepository.setLike()`.
* `getWatchlistMovies`, `getWatchlistShows`, etc., now fetch items from the `MediaRepository` using the new `isLiked=true` filter.
* `JellyfinMediaRepository` and `MediaRepository` now accept an `isLiked` parameter and apply the `ItemFilter.LIKES` when querying the API.
* **Database:**
* `WatchlistDao`, `WatchlistItemEntity`, and all related providers in Dagger have been deleted.
* A new database migration (`MIGRATION_14_15`) has been added to drop the now-obsolete `watchlist` table, bumping the database version to 15.
* **ViewModel & UI (`ItemDetailViewModel`, `ItemDetailScreen`):**
* The local `isInWatchlist` state has been removed.
* The `toggleWatchlist()` function has been renamed to `toggleLike()` and updated to optimistically update the UI's `liked` state while making an API call to the server.
* The UI now determines whether to show a filled or an empty "favorite" (like) icon based on the `item.liked` property.
This commit improves the user experience by adding clear visual indicators for watched media and hiding already-watched items from "Latest" sections on the Home screen. It also adds support for animated GIF images.
Media items that have been fully watched will now display a prominent checkmark icon overlay on their posters in carousels and grids.
For shows, the episode count badge now intelligently displays the number of *unplayed* episodes. If all episodes are watched, no badge is shown, and the watched checkmark appears instead.
To keep content fresh, the "Latest Movies" and "Latest TV Shows" carousels, along with individual library sections on the Home screen, will now filter out items that have already been watched.
### Key Changes:
* **Watched Content Filtering (`AppDataRepository.kt`):**
* Items that are marked as `played` are now filtered out from the "Latest" movies and TV show sections on the Home screen. This also applies to individual library carousels.
* "Highest Rated" sections will continue to include watched items to provide a comprehensive list.
* **UI Enhancements (`MediaItemCard.kt`, `HomeScreen.kt`):**
* A checkmark icon in a circular primary-colored background is now overlaid on posters for any media item (`AfinityMovie`, `AfinityShow`, etc.) that is fully watched.
* For shows, the episode count badge now displays the `unplayedItemCount`. The badge is hidden if the unplayed count is zero.
* **GIF Support (`ImageLoadingModule.kt`, `app/build.gradle.kts`, `libs.versions.toml`):**
* Added the `coil-gif` dependency to enable support for rendering animated GIFs in image loaders throughout the app.
* **Minor UI Cleanup (`SettingsScreen.kt`):**
* Removed an unnecessary `HorizontalDivider` from the Settings screen for a cleaner layout.
This commit updates the application's version information. The version name is incremented to `0.1.1-beta`, and the version code is raised to 10.
This was referenced Dec 17, 2025
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.
No description provided.