## Description
- Catch network exceptions when querying to populate the nav drawer
- Perform screensaver work on IO thread
- Fix possible crash if screensaver service runs while regular activity
is destroyed
- Fix genre images & backdrop images not loading
This PR also adds an Jellyfin SDK `ApiClient` wrapper to push all
network calls onto the IO thread. And tries to use a more strict
network-on-main policy for debug builds.
### Related issues
Fixes#994Fixes#1001
Should fix#1003
### Testing
Emulator with simulated exception throws
## Screenshots
N/A
## AI or LLM usage
None
## Description
Adds both an optional in-app and Android TV OS (DreamService)
screensaver
Has settings for:
- Starting delay, options from 30s to 1 hour
- Duration to show each image, 30s to 2 minutes
- Show clock (separate from app-wide clock)
- Toggle animated zooming
- Set a max age rating to limit what content is shown
- Included media types: movies, tv shows, and/or photos
By default only Movies & TV Shows are included. But if you have like
family albums on your server, you could enable Photos too.
There's also an button to start the screensaver so you can see what it
looks like.
### Related issues
Closes#230
### Testing
Emulator, Onn 4k pro, nvidia shield using both in-app and OS
screensavers
## Screenshots

## AI or LLM usage
None
## Acknowledgements
Some of the skeleton code for setting up the `DreamService` with the
right lifecycle was copied and modified from the [official app's
implementation](https://github.com/jellyfin/jellyfin-androidtv/blob/master/app/src/main/java/org/jellyfin/androidtv/integration/dream/DreamServiceCompat.kt).
## Description
Weblate's Android string parser (aka
https://translate.codeberg.org/projects/wholphin/) doesn't support
direct translations of string arrays.
Many of Wholphin's preference options are defined in string arrays and
therefore could not be translated. So this PR implements the [suggested
workaround](https://docs.weblate.org/en/latest/formats/android.html) to
move the string into individual entries and reference them in arrays.
Also moves some hardcoded strings into `strings.xml` so they can be
translated. Note: virtually all error messages are still hardcoded, but
they are only for exceptional cases, so it's probably not a huge
problem.
A minor bug where the backdrop would show briefly after switching users
is fixed.
### Related issues
Fixes#957
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## Description
An attempt to fix#769
1. Always fetch the `DisplayManager` when switching refresh rates
2. Use the Activity context instead of Application context
### Related issues
Fixes#769
### Testing
I still haven't reproduced #769 myself, but this change works fine on my
shield + LG C2
## Screenshots
N/A
## AI or LLM usage
None
## Description
This PR aims to fix#638 where the "Suggestions" row was mixing up
content from different libraries that shared the same library type. For
example you were in the Anime library, you'd see regular TV shows
showing up, as the TV Shows and Anime libraries would both be "Show"
libraries.
As @damontecres mentioned in the issue discussion, the
`/Items/Suggestions` endpoint Wholphin is using just returns random
items from the same library type, with no special logic or
recommendation algorithm.
I also looked at how the official WebUI handles this. It basically just
mixes "Resume," "Next Up," and "Latest Items" together. That felt a bit
redundant since we usually have dedicated rows for those things anyway;
I wanted to try something that helps discover new content.
I replaced the broken endpoint with a few custom `GetItemsRequest`
calls. These work correctly with the `ParentId` filter, so we only get
results from the library we are actually looking at. Additionally, I
added in some logic that takes into account what the user has been
watching to tailor the suggestions a little bit.
The new logic uses a 40/30/30 mix (this can of course be tweaked as
needed)
- Tailored (40%): Grabs your recently watched items from this library,
checks their genres, and returns items from the same genre.
- Random (30%): Random unwatched stuff from this library.
- New (30%): Recently added items.
This is implemented using only `GetItemsRequest` API calls using
filters, rather than any specialized endpoints like the
`/Items/Suggestions` endpoint. This means the feature should be
predictable and stable. If Jellyfin ever adds an actual recommendation
algorithm and endpoint to call it, I imagine we would want to switch to
that in the future though.
I also added some failsafe logic to make sure there will be diversity in
the "recently watched" items that get pulled, in case a user might have
recently binged a TV show. We wouldn't want every single recommendation
to be based off of that one show.
To fix this, I changed the query to fetch the last 20 history items
instead of just the top 3. Then, we filter that list client-side to find
unique Series IDs. If the user watched 10 episodes of One Piece in a
row, the logic collapses them into a single "One Piece" entry and moves
on to the next distinct show they watched. This guarantees we get
variety in the source material for recommendations.
This is a work in progress right now, mainly due to performance. For my
server it takes about 10-15 seconds to load the Suggestions row when I
tested. This is unacceptable in my opinion, especially if we ever intend
to add a Suggestions row like this to the home page like Plex does. I
have some ideas on how to improve performance, but I'm open to
suggestions.
### Related issues
Resolves#638
### Screenshots
Before:
<img width="1953" height="1162" alt="suggestions1"
src="https://github.com/user-attachments/assets/6e301c67-1a46-46b5-8184-3adb9e52b330"
/>
After:
<img width="1937" height="1108" alt="suggestions3"
src="https://github.com/user-attachments/assets/b9563865-4055-40b6-b452-f94c26c8b6e9"
/>
### AI/LLM usage
I used Claude Code to help write the Kotlin Coroutines so the API calls
run at the same time. I also used it to write the tests in
`TestSuggestionsLogic.kt`.
---------
Co-authored-by: Damontecres <damontecres@gmail.com>
## Description
Can now configure a different subtitle style for HDR playback.
There is also a new setting to change the opacity/dim image based
subtitles. This is primarily for HDR to dim very bright PGS subtitles,
but the setting is available for SDR too.
Please remember that the styles only apply to unstyled text formats like
SRT.
I haven't been able to consistently get the preview to switch the
display into HDR mode, so the preview is not 100% accurate.
### Related issues
Closes#583
### Testing
Shield pro 2019 w/ LG C2
## AI or LLM usage
None
## Description
Simplifies the refresh rate/display mode change code by removing the
live data go between.
Also, instead of a `CountDownLatch` that blocks the thread, use a
`Deferred` to suspend the coroutine instead.
### Related issues
Might help with #769
### Testing
Tested on nvidia shield
## Description
Adds (back) the ability to set a per-user PIN. This is required to
switch to the user. If the user has a PIN, this overrides and ignores
the "Sign in automatically" setting for that user.
The PIN consists of any combination of D-Pad directional buttons. If you
forget the PIN, you can click the button to login via the server instead
(ie QuickConnect or username/password) which will also remove the PIN so
you can set a new one if desired.
### Related issues
Closes#268
Replaces #398
Related to #321 & #356
### Screenshots

## Description
This PR add the ability to integrate with a [Jellyseerr/Seerr
server](https://github.com/seerr-team/seerr).
### Features
- Login to the Seerr server using API Key, Jellyfin credentials, or
local Seerr credentials
- Separate Seerr logins per user profile
- Search Seerr from the search page
- Discover media from Seerr on the nav drawer `Discover` page
- Also from movie, series, or person pages
- Seamless integration with existing media, i.e. selecting media found
from Seerr that already exists on the Jellyfin server, will go directly
to the regular media page
- Mostly consistent UI between Jellyfin media & Seerr media
- Submit requests to Seerr
- Cancel submitted requests
### Screenshots

### Related issues
Closes#54
## Acknowledgements
The `app/src/main/seerr/seerr-api.yml` file is copied & modified from
https://github.com/seerr-team/seerr/blob/develop/seerr-api.yml. I hope
to try to upstream some of the changes in the future.
## Description
Makes sure the `ServerEventListener` and `DatePlayedInvalidationService`
are injected so that they run. This was broken in #538.
Also fixes the a delayed stopping of theme music
Also fixes for detecting a non-seamless refresh rate switch
### Related issues
Fixes#615Fixes#568
## Description
Adds a settings for automatic resolution switching. When enabled, the
app tries to output content at the video stream's resolution.
For example, if playing 1080p content on a 4K TV, the actual output by
the Android TV device will be 1080p.
This works in hand-in-hand with automatic refresh rate switching. So
enabling both allows for the output to match both refresh rate and
content resolution. Outputting the best refresh rate is preferred over
best resolution.
Also, shows the current display mode in the playback debug info.
### Related issues
Closes#428Fixes#531
## Description
When the app is put into the background with auto sign-in disabled, it
will remove the current page and show a loading indicator. This way when
the app is resumed, the previous content won't flash on screen for a
split second.
The above should technically fix#584 on its own, but as additional safe
guide, this PR also makes sure the `ApiClient` is configured before
trying to create image URLs.
### Related issues
Fixes#584
## Description
Fixes issues when the app is resumed, such as after the screensaver is
dismissed.
For example, if you pause during playback and the screensaver starts,
Wholphin will stop playback and go back to the previous page. But with
this PR, instead of focus being lost and defaulting to teh nav drawer,
focus will restore on the play button or episode card.
### Related issues
Related to #552 &
https://github.com/damontecres/Wholphin/issues/552#issuecomment-3690614491
## Description
Improves how the app restores state when auto sign in is enabled. If
auto sign in is enabled, the app will restore back to the last page.
#538 altered the app start up logic. This caused the app to reset state
more often when it goes into the background.
### Related issues
Related to #552
## Description
- Ensures settings changes take effect immediately instead of requiring
an app restart
- Add conditional & catch when checking for app updates
### Related issues
Fixes issues introduced in #538
## Description
The major user facing change in this PR is adding back the setting to
toggle automatic sign in on or off. This controls whether to restore the
app to where you left off or go the user selection page.
If enabled: re-opening the app will restore the previous user's session
If disabled: re-opening the app will always start with the user
selection page for the most recent server, or if there isn't a recent
server, the server selection page
This also separate this setting from the PIN protection settings in
previous PRs.
### Dev changes
This PR refactors the "setup" UI (server & user selection) to be
separate from the "app" UI (the actually app content). There is now a
`NavDisplay` for the setup flow which ends with displaying the
`ApplicationContent`'s `NavDisplay`. Most of the logic is moved out of
Compose code and into a `ViewModel`.
This means to switch users/server, the `SetupNavigationManager` must be
used instead of `NavigationManager`.
### Related issues
Closes#396Fixes#376
## Description
Creates a `CompositionLocal` which tracks the current time in a single
place and is usable anywhere in the app.
Can be used such as:
```kotlin
val now = LocalClock.current.now
val details = remember(item, now) {
// Create detail strings based the item and current time
// This will be recomposed/updated whenever the time changes
}
```
### Related issues
Related to #475
Unfortunately, I think the PIN and automatic sign-in features require
more thought before it should be rolled out as a stable feature.
This PR disables the two settings and removes them from the UI.
See discussions in #321 and will reopen#268
Adds an advanced playback setting to enable automatic refresh rate
switching during playback
When enabled, the app looks at the available display modes, chooses the
best candidate, and attempts to switch to it. After playback ends, the
display is switched back to the original mode.
Closes#62Closes#379
Allows for setting a per-user profile PIN that must be entered to switch
to the user. The PIN is a sequence of directional buttons, ie D-Pad
left/right/up/down.
This PIN is per device per user per server. The PIN is stored locally
and not sent nor shared with the server. If you forget your PIN, can
still access the app using server credentials which also removes the
PIN.
Additionally, there is another setting to disable automatically sign in.
When enabled (default) the last user is automatically restored, even if
there is a PIN. If disabled, a server & user must always be selected
when opening the app.
Closes#268Closes#321
## Details
Adds options to customize how grid pages are displayed. Every grid page
can be individually customized.
The options are saved per user on the device and restored when
navigating back to the page. The pages that support it have a new button
next to the sort/filter buttons and changes are updated live.
The options are:
* Primary or Thumb image
* Aspect ratio
* Show details header w/ backdrop (similar to the one on the home page)
* Number of columns
* Spacing between cards
* Card image content scale (eg Fit, Fill, Crop, etc)
Note: the Genre tabs' grids cannot be customized yet
### Other changes
- Nav drawer now opens over top of content instead of pushing it
- Images for most cards are fetched with actual fill size
### Possible future work
* Customize Genre grids
* Add more image types, banners?
* Add similar customization options to pages with rows, eg Home page and
Recommended tabs
## Example
For example, this is a movie library using thumb images with 8 columns
and reduced spacing. It also shows the details header
## Issues
Closes#186
Related to #72
Fixes thread used by changes from #359
Also create the device direct play profile lazily-ish off of the main
thread because this can take some time to create.
Should help address some of the "too much work" reported in #363, and
also fixes the network-on-main exception in the logs on #363
## Details
This PR contains a number of optimizations
### Images
Updates to request images with maximum sizes
The max sizes are estimates on the maximum number of pixels that will be
actually displayed. This means the server is downscaling large images
which means 1) better quality downscaling and 2) smaller images sent
over the network and cached
This should mean slightly better quality images and more images that can
be cached locally
### Paging
Reduces network calls when fetching paginated data, ie grid pages and
some rows. This PR combines the total record count & first page queries
which slightly reduces total time to load paginated data.
Additionally, on movies/tv show recommended pages, the rows now only
fetch a limited number of items (same as number on home page). While
they previously fetched using pagination, there is an overhead required
to paginate requests, so this is slightly faster.
### Async recommended fetching
On movies/tv show recommended pages, the rows are now fetched completely
separately from each other. Previously, the rows were requested
separtely, but each was only added to the UI in order as each completed.
Now they will add as the data arrived.
Note: Top unwatched TV shows is still very slow on `10.11.x`, see #204
### Image cache
The local, on-disk image cache size is increased from 100mb to 200mb.
Combined with the smaller images, this covers about 1500-2000 poster
images, but will vary by server.
The cache size is now also configurable in advanced settings from 25mb
to 1000mb. Additionally, you can see how much of both the disk and
memory caches are in use.
## Issues
Closes#330
Related to #120
Adds a toggle to increase the verbosity of the app logs for
release/production builds
Most users won't need to use this, but it can be helpful when [gathering
app
logs](https://github.com/damontecres/Wholphin/wiki/Gathering-app-logs)
to report an issue.
- Keep the currently selected nav drawer item in view and focus on when
entering
- Adjust star rating height so that the row is consistent preventing
resizing when moving between episodes with & without a rating
- Simplify checks when switching to a new server and use more specific
keys to prevent needing to switch servers twice
## Details
This PR updates the device profile used by ExoPlayer. It should more
accurately report support for HDR formats.
## Acknowledgements
This PR contains a commit (cd6351912af72d274b0baf50af4d777b986f0f46)
that has code copied and slightly modified from
https://github.com/jellyfin/jellyfin-androidtv `v0.19.4`.
Major acknowledgement & credit to the Jellyfin Android TV developers for
this code!
## Issues
Related to #15
Experimental MPV player backend
Related to #14, #22, & #85
You can switch to MPV in advanced settings and toggle using hardware
decoding or not.
This uses code and buildscripts from
https://github.com/mpv-android/mpv-android, plus other third party
libraries to build MPV
Now when initiating a user or server switch, you can't back out of it
and must select a user/server. This will be useful when PIN code are
implemented down the road.
The app will now disconnect the web socket when backgrounded.
Also lots of internal refactoring
Refactors lifecycle event observers
When the app is "paused", aka not actively focused, but still visible
(such as when opening Android TV OS menu), playback will pause.
When the app is "stopped", aka not visible (such as pressing Home
button), playback will stop, report playback progress, and return to the
previous screen.
I think this will fix#181, but I don't have a controller to test with
Fixes#113
- Ensures all audio and subtitle options are shown during playback
- Fix home rows not being at top when going back
- Show error message when background home page refresh fails
Also shows more details for login failures and adds a link to the debug
page (with log info) after multiple login failure attempts. Hopefully
this can help diagnose #112 and #18
Fixes:
* Issue from #39 where pressing back from playback went back two screens
instead of one
* Sometimes having to click on a server twice to switch to it
* Update UI when marking a single season as watched
* Fix needing to press back twice to hide skip segment buttons
* Fix skip intro/outro behaviors being swapped
* Always attempt to save playback progress when stopping playback
Ensures playback (both theme song & video) is stopped when the app is
backgrounded, like hitting the home button.
Fixes a UI glitch when marking a series as played.
Previously if the app is playing a show's theme song and the app is
backgrounded, such as by pressing Home, the music would continue. This
PR fixes that.
Remembers changes in playback tracks across playbacks. So, if you change
the audio track, quit the app, and return to the same id, the app will
play the audio track previously chosen.
Additionally, this PR fixes a UI inconsistency when there are multiple
versions of a item. Previously sometimes the audio/subtitle tracks for
wrong version would be shown during playback.
Fixes#10
Adds toggles to disable direct play of AC3 audio, ASS subtitles, and PGS
subtitles. Also a toggle to force down mixing audio to stereo.
This copies the behavior from the official client. I'm not sure if there
is a way to determine if direct playing AC3 is possible because it can
depend on devices other than the Android TV device such as a sound bar.
So it's up to the user to toggle off support if necessary.
Attribution: This PR uses on [code from the official
client](c775603df4/app/src/main/java/org/jellyfin/androidtv/util/profile/deviceProfile.kt).
Fixes#21
Might also address #18
Fixes an issue with logging using username/password due to network
access on wrong thread exceptions.
Also adds better handling when deleting users or servers, especially if
it's the current one.