Commit graph

507 commits

Author SHA1 Message Date
Damontecres
3f60fa7550
Add option to override user profile settings for audio & subtitle languages (#1680)
## Description
Adds settings under the "User profile settings" section which allows for
specifying preferred languages for audio and subtitles and the preferred
subtitle mode.

By default (matching existing Wholphin behavior), the preferred
languages and subtitle mode are derived from the user's profile settings
provided by the server which can be set on the WebUI:
User->Settings->Playback or Subtitles. However, this isn't well
understood and Wholphin doesn't display these values anywhere, so many
users were confused.

The preferred languages and subtitle mode can now be configured from
within Wholphin. Setting these will **not** update the server. The
settings are **only** used locally.

### Related issues
Related to #319
Closes #790

### Testing
Emulator manually changing some settings, added additional unit tests to
ensure the overrides are respected when choosing tracks

## Screenshots
### Settings page
<img width="1280" height="720" alt="settings_01 Large"
src="https://github.com/user-attachments/assets/28cc2f6b-3a60-42a4-b268-48695086d566"
/>

### Clicking into "More user profile settings"
<img width="1280" height="720" alt="settings_02 Large"
src="https://github.com/user-attachments/assets/6c3be3aa-c177-4d44-8060-b76d15fb10d7"
/>

### Language choice dialog

Can filter languages by typing in the search box at the top

<img width="1280" height="720" alt="settings_03 Large"
src="https://github.com/user-attachments/assets/c014d0ba-8d5b-4201-a6ee-4876b478148c"
/>


## AI or LLM usage
None
2026-07-14 14:17:31 -04:00
Damontecres
077b7e4570
Show duration & ends at time on next up card (#1690)
## Description
Adds the duration & ends at time to the next up card

### Related issues
Closes #1664

### Testing
<!-- Describe how this change was tested and on what device(s) -->

## Screenshots
<img width="660" height="241" alt="image"
src="https://github.com/user-attachments/assets/7551843e-4f53-43fc-af2a-3e503ba6d03c"
/>

## AI or LLM usage
None
2026-07-13 01:30:54 -04:00
Damontecres
f74306a12c
Fix subtitle outline width not applying in release builds (#1687)
## Description
Fix applying the subtitle outline width in ExoPlayer for release builds

The outline width field isn't public, so reflection is used to bypass
and modify it. Since proguard/r8 renames all of the classes and fields,
this meant the field was no longer found. The fix is to have proguard
preserve the necessary field names.

### Related issues
Fixes #1681

### Testing
Emulator w/ release build

## Screenshots
N/a

## AI or LLM usage
None
2026-07-11 13:21:41 -04:00
Damontecres
26124a5348
Improve track selection logic (#1654)
## Description
Updates the logic for selecting tracks which should fix several edge
cases

The new logic groups track types together and then applying the user's
selection to the actual tracks in the file. For example, if the user
choosing the audio track which the server reports as absolute `index=2`
(eg the _third_ track of any type in the file) and audio `index=1` (eg
the _second audio_ track in the file), then the track selection logic
will use the _second audio_ track in the direct played file (after
accounting for id sorting).

Some other changes:
- If direct playing and an unsupported track is selected, the app will
now fall back to transcoding
- If the correct audio/subtitle tracks are not found, the app will now
fall back to transcoding instead of blocking any track change attempts

### TODO
Not necessarily in this PR, but some things need further investigation:
- Handling external audio tracks
- Why does ExoPlayer order the tracks differently sometimes, see
[example
here](https://github.com/damontecres/Wholphin/issues/791#issuecomment-4836470813)
where `0:3` is _after_ `0:4`, but the `MediaSourceInfo` lists them `0:3`
then `0:4`

### Related issues
Maybe fixes #791
Should fix
https://github.com/damontecres/Wholphin/issues/1005#issuecomment-4085440175
Related to the parent issue, #1475
Replaces #845

### Testing
Unit tests mostly, some basic tests on emulator

Needs more "real world" testing

#### Try it out?

You can try out this build by following the [instructions
here](https://github.com/damontecres/Wholphin/releases/tag/develop-track-selection).
If you do, please report your results in this PR!

## Screenshots
N/A

## AI or LLM usage
None
2026-07-10 17:49:47 -04:00
Damontecres
d481aea85a
Experimental option to transcode surround sound audio to AC3 (#947)
## Description
Adds an experimental setting to prefer transcoding audio with more than
2 channels to AC3. Stereo audio does not transcode.

This is basically a workaround for HDMI ARC (not eARC) or optical audio
devices because instead of 2 uncompressed PCM channels, 6 AC3 channels
(ie 5.1) is possible.

An downside of enabling this is that embedded subtitles be burned in
causing a video transcode as well.

### Related issues
Fixes #255
Incorporates some code from #1410

### Testing
Just on the emulator so far to observe if the settings trigger the
transcode or not

## Screenshots
N/A

## AI or LLM usage
None

---------

Co-authored-by: darkflame91 <darkflame91@gmail.com>
2026-07-09 13:15:42 -04:00
Damontecres
013755208d
Update Seerr integration version & start blocklist handling logic (#1671)
## Description
Start testing against Seerr `3.3.0` which has been out for over a month.
The only significant change is that the new "blocklisted" status is
added, but it uses the same code as the previous "deleted" status. So
generally, Seerr `3.2.0` will still work.

This starts work on supporting Seerr's blocklist which, unfortunately,
is expected to be enforced on the client side. For now, blocklisted
items still show, but the request button is disabled and shows
"Unavailable" instead.

Finally, some Seerr parent permissions I missed in #1631 are added.

### Related issues
Related to #1626

### Testing
Emulator testing

## Screenshots
N/A

## AI or LLM usage
None
2026-07-07 13:56:22 -04:00
Tal Sarid
f6e00c7820
Add localized duration formatting and related string resources (#1571)
## Description
Instead of using English-only duration format (e.g. `HHh MMm SSs`) in
various places, I've added a format function that is based on several
new localized resources keys.

That includes:
1. Media runtime in Item view
2. Time remaining in Item view
3. End time in Player view
4. Time passed and time remained in Player view

### Related issues
None

### Testing
I installed the app on my Google TV Streamer, switched to my language,
browsed all item views that I could think of to see that the duration
labels are all localized in my language. I didn't commit those strings,
I will do it through the Weblate after it will get merged. I also played
a few items and saw that the labels there are localized as well.

## Screenshots
It looks the same in English as before, currently no other language has
custom resources for it yet.

## AI or LLM usage
Used Claude Sonnet to detect places that I missed that are related to
this localization change. Also it helped me to get access to my format
function from various places in the code.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-07-06 08:43:06 -04:00
Damontecres
0e62b9582c
Improved lifecycle handling & code clean up (#1653)
## Description
Add some improvements related to life cycle handling whenever the app is
resumed:
- Refreshing the server-side user config 
- Refreshing the home page automatically

Also 401/403 errors accessing recording folders will be skipped since
this typically means the user lost access while the app was running.
Refreshing the server-side user config (above) will also help with this.

Finally, there's some general code clean up in `MainActivity` to move
non-UI related code out of Compose.

### Related issues
Closes #1647

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-07-01 19:18:16 -04:00
calebvetter
1c9081951a
Fix AFTKRT + HSL/TS + EAC3 7.1 playback issues (#1580)
## Description
This is a targeting fix for a very specific bug: on Fire TV 4k Max
(AFTKRT), and possibly others but untested, ExoPlayer can't play an
HLS/TS stream that has 8-channel (7.1) EAC3 audio. Direct play is not
affected (7.1 EAC3 plays fine), and fewer channels work fine (i.e. 5.1
EAC3) even in an HLS/TS wrapper.

This bug + device is tracked in KnownDefects. If more models are tested
and found to have the same issue, they can be added to the list. Top
candidates are probably AFTKA and AFTKM since they are also in the
models with HEVC DoVi/HDR10+ playback issues and so probably have
similar underlying limitations, but I don't have those devices to test.

The fix is to first allow the app to make a playback request to the
server and receive the stream info Jellyfin has decided to send. Then it
evaluates the settings and stream for the following:
- Playback is using ExoPlayer
- Device is in the modelsWithEac3HlsPassthroughBug list (currently only
AFTKRT)
- Stream is not direct play
- Stream is HLS with MPEG-TS container
- Audio is 8-channel EAC3

We have to use a two-request fix because we don't know what Jellyfin is
going to decide for the stream until we receive it. That way normal
playable streams aren't getting overwritten by the fix when they
shouldn't be. So the only streams that get the two request path applied
is the exact fix for this bug.

To apply post-playback-info fixes (including this one) a helper file was
created PostPlaybackInfoFixes. In the future, if there are more bugs
that can only be determined after the decided stream info is received,
they can be added here. This keeps things logical and maintainable.


### Related issues
The bug was able to be reproduced on multiple items with this exact
scenario by simply playing back the item (making sure ExoPlayer is set
as the default player in settings).

### Testing
Tested on the target device: Amazon Fire TV 4k Max (2nd Gen), model
AFTKRT.

The following media was tested:
- ExoPlayer, multiple titles with HEVC, EAC3 7.1 copied into HLS/TS (all
failed, only processing 1-2fps)
- Direct play of the same titles (works)
- EAC3 5.1, HLS, MPEG-TS (works)
- MPV with failing titles (works)

The following device and settings were tested and had no effect on the
above media results, ruling out external connections and settings:
- HDMI to an LG TV, both connected to a soundbar via ARC, and
disconnected using internal speakers
- HDMI to a Dell computer monitor
- Fire TV Settings > Display & Sound > Audio > Surround Sound > all 4
settings tested (Best Available, PCM, Dolby Digital Plus, Dolby Digital)

## AI or LLM usage
Codex was used to debug the issue, create the initial change, and do
iterative testing on the device to narrow the scope. The code was then
carefully reviewed and I made structural decisions so everything fits
well within the project's established conventions, removing bloat, added
comments and kept it targeted, clear and maintainable.
2026-06-27 17:42:01 -04:00
Damontecres
083d4e4fa8
Add experimental settings & video tunneling (#1624)
## Description
This PR introduces the concept of "experimental" settings or features.
These may cause instabilities or may need further testing. They may be
changed or removed any time. Also, the developers won't provide lots of
support for them.

The goal is expose some specialized settings that might only apply to a
small subset of users or test out tweaks to playback.

The first experimental feature is a toggle to enable [video
tunneling](https://developer.android.com/media/media3/exoplayer/track-selection#tunneling).

### Related issues
Related to #1283

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-27 14:29:37 -04:00
Damontecres
21e720c420
Also check Seerr parent permissions (#1631)
## Description
When saving Seerr permissions on the WebUI, if a "parent" permission is
checked, only its bit is flipped and its children's bits are not. So
clients must check if a user has the permission _or_ its parent.

For example, if just "Request 4K" is checked, the flags for "Request 4K
Movies" and "Request 4K TV" will not set explicitly.

### Related issues
Fixes #1630

### Testing
Emulator & unit tests, also manually reviewed API requests/responses on
Seerr's web UI

## Screenshots
N/A

## AI or LLM usage
None
2026-06-27 14:28:57 -04:00
Damontecres
a8ade9171e
Update wholphin-extensions with newer MpvPlayer (#1365)
## Description
Uses the newer version of `wholphin-extensions` which now has the Kotlin
code, so this PR removes the MPV Kotlin code from this repo. Also
updates gradle to use providers.

There are no user facing changes

### Dev notes

`wholphin-mpv` can be provided by:
1. [Fetching pre-built
binaries](https://github.com/damontecres/wholphin-extensions#pre-built-binaries)
(Preferred method for devs)
2. Building `wholphin-extensions` from
[source](https://github.com/damontecres/wholphin-extensions#build-from-source)
3. Using `wholphin-mpv-stub` (the new module added in this PR) which
allows for compiling Wholphin, but will throw exceptions if MPV is used
during runtime

### Related issues
Related to #1172 

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-26 12:50:45 -04:00
Damontecres
f5ce9745ba
Several UI/UX minor changes (#1623)
## Description
Gathering some smaller UI/UX changes:
- Default to the user's preferred subtitle language when
searching/downloading subtitles and if unset, fall back to the UI's
language
- Only show >0s runtime on quick details & don't show negative ends at
- On the OS channel row for recently added, only include movies &
episodes
- Only show movies & episodes to "Recently Added" Android OS channel
- Fix context menu for adding songs & albums to the music queue

### Related issues
Related to #1339 & #1484
Fixes #1617
Fixes
https://github.com/damontecres/Wholphin/issues/1329#issuecomment-4440684328

### Testing
Just on the emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-26 12:43:56 -04:00
Damontecres
e5887dfa15
Better UX for separate SDR vs HDR subtitle styles (#1622)
## Description
This PR moves the separated HDR subtitle style behind a toggle. This
means users must now opt-in to using separated SDR vs HDR subtitle
styles. This is a better UX for users who want to customize the style
but use the same styles for both.

Users who have changed the HDR subtitles previously will have the toggle
enabled automatically. If the user hasn't changed HDR style or their SDR
& HDR styles are the the same, the toggle will be disabled.

Also, fixes a bug where when playback switched between SDR or HDR, the
subtitle styles might not be updated.

### Related issues
Closes #1603

### Testing
Emulator & unit tests for migration

## Screenshots
N/A

## AI or LLM usage
None
2026-06-24 19:26:05 -04:00
Christian Tismer-Sperling
8a684545ac
Respect system 24-hour setting in clock time format (#1619)
## Description
<!-- Describe the changes in detail -->
The clock ignored the device's system 24-hour preference:
getTimeFormatter derived 12/24h purely from the locale. This reads
DateFormat.is24HourFormat and builds the time pattern from it, so the
clock follows the system setting.

### Related issues
<!-- If this is a new feature or a change, there must be a discussion in
an issue first, reference the issue here -->
<!-- If fixing a bug, reference the bug issue here, or describe the bug,
including steps to reproduce -->

### Testing
<!-- Describe how this change was tested and on what device(s) -->
Tested on the emulator toggling the system 24-hour setting on/off.
assembleDefaultDebug, testDefaultDebugUnitTest and pre-commit (ktlint)
pass.

## Screenshots
<!-- Please include screenshots if the PR alters any UI elements -->

## AI or LLM usage
<!-- If you used any AI or LLM assistance, please list where in the code
and how you tested it -->
The analysis and the fix were done by me with AI assistance (Claude). I
wrote the description myself; the English wording was polished with AI.
I understand the code and can maintain it.
2026-06-24 17:02:53 -04:00
Damontecres
d705a3ea01
Add filtering & sorting for discover grid pages (#1614)
## Description
This PR adds sort & filter options for the discover grid pages.

Sort options:
- Popularity
- Release date
- "Community rating" (TMDB user vote)
- Name

Filter options:
- Genre
- Studio/Network
- "Community rating" (TMDB user vote)
- Parental rating
- Production status (TV only)

Also, two more tabs are added to the discover page for browsing movies
and TV. These are essentially the same as clicking "View more" on the
respective rows on the Discover tab.

### Limitations

This PR hardcodes the region used for studio listing and filtering to
"United States". I'll work on a follow up PR to enable users to specify
this.

The sort & filters are not persisted. I think they should be on the two
new tabs, but not elsewhere, but this will be a follow up PR.

### Related issues
Related to #702 
Implements some of #1511
Rewrites the filter logic in #1610 

### Testing
Emulator, but needs further testing

## Screenshots
<img width="1280" height="720" alt="discover_filters Large"
src="https://github.com/user-attachments/assets/cdefb95c-c4b7-4e06-9bac-b535d372ba03"
/>


## AI or LLM usage
None
2026-06-23 17:24:37 -04:00
Damontecres
552c3b5500
Fix inconsistent playback end behavior issues (#1616)
## Description
The exact behavior of what happens when playback ends based on the
user's settings would change between versions. This PR defines the
behaviors better and includes unit tests to verify future changes won't
break it again.

### Related issues
Fixes #1548
Related to https://github.com/damontecres/Wholphin/pull/1257

### Testing
Emulator & unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-06-23 17:23:47 -04:00
Damontecres
899e3decc2
Prefer non-forced when subtitle preference is always on (#1618)
## Description
If subtitles preferences are "Always", this PR will prefer non-forced
tracks even if any forced ones are default tracks.

This is in-line with the web UI from my testing and another review of
the code.

### Related issues
Fixes
https://github.com/damontecres/Wholphin/issues/790#issuecomment-4708705576

### Testing
Unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-06-23 17:23:37 -04:00
Damontecres
7422f15bff
Fix possible crash if remembered tab no longer exists (#1613)
## Description
If remember tabs is enabled and the current remembered index is somehow
removed, the app would crash.

I think the only way a regular user can encounter this is if the server
removes a live TV recording folder that the user has
selected/remembered. All other tabbed pages use a fixed list.

### Related issues
None

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-23 11:11:39 -04:00
Damontecres
f21b29fe1b
Discover movies & tv shows by genre (#1610)
## Description
Adds genre rows for movies & TV shows to the discover page. These work
the same as on the Seerr web UI, clicking one will show media in the
genre.

### Related issues
Related to https://github.com/damontecres/Wholphin/issues/702

### Testing
Just on the emulator so far

## Screenshots
<img width="1280" height="720" alt="discover_genres Large"
src="https://github.com/user-attachments/assets/93e5ef25-e253-49bc-9009-89f814889c98"
/>


## AI or LLM usage
None
2026-06-22 19:35:44 -04:00
Damontecres
c945e1a472
Several small fixes (#1612)
## Description
- Fixes showing "null" in the subtitle for some tv episodes (usually
daily shows like Jeopardy)
- Partially fix holding back to return to the previous grid position
(still has focus issues)
- Show/hide tabs on the discover page similar to other pages in the app
- Prevent a warning server-side if a negative playback timestamp is sent

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-22 18:38:19 -04:00
Damontecres
77d7571276
Choose Seerr quality profile & root folder (#1604)
## Description
Adds option to select the quality profile and/or root folder when
requesting from Seerr.

The user needs "Advanced Requests" permission to use this feature. If
not, the options won't show.

### Related issues
Closes #863
Related to #702

### Testing
Emulator w/ different user permissions and different request
configurations

## Screenshots
<img width="1280" height="720" alt="request_movie Large"
src="https://github.com/user-attachments/assets/2665dcbb-e6c3-4d26-857c-b465edff6a02"
/>


## AI or LLM usage
None
2026-06-22 18:37:16 -04:00
Damontecres
d85f188236
Show runtime on different versions dialog (#1607)
## Description
Small PR to add the runtime for different versions of media to the
choose version dialog.

This can be helpful to further distinguish versions such as theatrical
vs extended editions.

### Related issues
Suggested
https://github.com/damontecres/Wholphin/pull/1522#issuecomment-4766811832

### Testing
Emulator

## Screenshots
<img width="560" height="337" alt="image"
src="https://github.com/user-attachments/assets/47b0c1be-d1d7-4845-b097-a67358f584f9"
/>


## AI or LLM usage
None
2026-06-22 09:44:19 -04:00
Damontecres
ae49e977ce
Fix crash on certain grid pages when the app is sent to the background (#1605)
## Description
Fixes a crash when backgrounding/restoring the app on certain grid pages

### Related issues
Fixes https://github.com/damontecres/Wholphin/issues/1598
Replaces #1599

### Testing
Emulator

It's easy to reproduce by going to a library's recommended tab,
scrolling to any row's view more, then pressing home to background the
app

## Screenshots
N/A

## AI or LLM usage
None, but includes a commit from #1599 which did, see the note there

---------

Co-authored-by: Christian Tismer <tismer@stackless.com>
2026-06-20 20:06:34 -04:00
Damontecres
8e0798ee16
Unit tests for PlaybackViewModel & several services (#1592)
## Description
This PR contains only tests, there are no user facing changes.

Adds tests for playback covering:
- Playing next, previous, or within the queue
- Media segments (intro/credit)
- Playing intros before media

Adds basic unit tests for track selection. This uses a new "test track"
builder which can model various files and build them as represented
(differently) by the server, ExoPlayer, and MPV. In future, this will
allow for testing of more complex files.

Also add unit tests for services covering things like:
- Fetching extras
- Deleting media
- Server/user management & auth

### Related issues
Will help with testing/verifying some issues like #1475, #1548 

### Testing
Ran the unit tests!

## Screenshots
N/A

## AI or LLM usage
None
2026-06-19 11:06:35 -04:00
Damontecres
e17ae3eb8a
Use Wholphin-specific dispatchers (#1583)
## Description
Switches all usages of `kotlinx.coroutines.Dispatchers` to
`WholphinDispatchers`.

`WholphinDispatchers` provides an easier and more reliable mechanism to
use a test dispatcher in unit tests. For regular app usage,
`WholphinDispatchers` just delegates to `Dispatchers`.

There are no user facing changes

### Related issues
None

### Testing
Basic emulator testing & unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-06-18 11:17:19 -04:00
Damontecres
ddbec0da73
Fix issues from #1530 2026-06-14 19:55:01 -04:00
Damontecres
fa5cc99c3b
De-duplicate string resource keys (#1560)
## Description
Ensures that all string & plural resource keys are unique. This should
help make sure all of the strings are shown in weblate's translation.

### Related issues
Related to #1551

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-12 01:24:24 -04:00
Damontecres
38b4a8c4de
Play or shuffle series, season, collections, & playlists from context menu (#1544)
## Description
Adds options to the context menu to play or shuffle items in a series,
season, collection, or playlist. So you can long click a TV show and
play it directly.

Playing a TV show will play the next up episode (same as the play button
on the series detail page).

Playing a season, collection, or playlist will start from the beginning.

Also, removes the green play arrows and uses the same neutral color as
other icons.

### Related issues
Closes #1451
Closes #1507

### Testing
Emulator from library pages & series detail pages

## Screenshots
N/A

## AI or LLM usage
None
2026-06-10 19:30:07 -04:00
Damontecres
f7f0ea9cca
Fixes missing parental ratings & focus loss when changing filters (#1559)
## Description
- Ensures all parent ratings are shown in the filter drop down
- Fixes focus loss after filtering library and there are no results

### Related issues
Fixes #1535 (along w/ #1529)
Fixes #1534

### Testing
Emulator w/ a UK movie library

## Screenshots
N/A

## AI or LLM usage
None
2026-06-10 19:29:49 -04:00
Damontecres
01bd3249fa
Fixes two row bouncing UI issues (#1543)
## Description

Fixes row bounce using `SeasonCard` when are two exactly two items. This
was done by calculating the y-offset in the `layout` modifier instead of
`offset`. This has the side effect of probably being very slightly more
efficient since only 1 animation state is needed now.

Fixes row bounce on the second row of the home page if the first row is
empty and not shown.

### Related issues
Fixes #1528
Fixes #1271

### Testing
Emulator in different situations. Also checked the layout inspector to
make sure the optimizations from #1184 weren't affected

## Screenshots
N/A

## AI or LLM usage
None
2026-06-08 17:23:09 -04:00
Damontecres
93d601e7bf
Improvements to debug page (#1538)
## Description
Makes some improvements to the debug page. Also adds some audio device
listing for debugging.

### Related issues
N/A

### Testing
Emulator & shield

## Screenshots
N/A

## AI or LLM usage
None
2026-06-08 13:45:48 -04:00
Damontecres
b49926f80b
Store remembered tabs in app database instead of preferences (#1541)
## Description
Moves storing the remembered tabs from app preferences to the app
database. This means deleting the user will remove the remembered tabs
and the app preferences file is smaller and faster to load.

The remembered tabs are migrated automatically when the app is updated.

There are no significant user facing changes in this PR.

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-08 13:45:38 -04:00
Damontecres
a4ee1e5175
Only show relevant parental ratings when filtering (#1529)
## Description
Updates the parental rating filter so it only shows the relevant options
instead of all of them. This is now the same behavior as the web UI.

Additionally, the filter options are cached for a short time so the UI
doesn't need to load them every time the menu is opened.

Dev note: Refactors `FilterUtils` into a service which allows for the
caching

### Related issues
Closes #410

### Testing
Emulator with movie & tv show libraries

## Screenshots
N/A

## AI or LLM usage
None
2026-06-07 07:15:40 -04:00
Damontecres
d1b8c09615
Add a shortcut to chosing the version of an item (#1522)
## Description
Based on feedback from users, many felt it was difficult to 1) tell if
multiple version of an item existed and 2) choose the version they want

So this PR adds a new expandable button next to Play/Resume/Restart to
choose the version. It is a shortcut to the More->Choose Version dialog,
but also serves as a more prominent indicator that there are multiple
versions. The button is only shown if there are 2+ versions to choose
from.

Also adds displaying the bitrate in the choose version dialog just in
case there are identically named versions with the same resolution.

Dev note: I also added some docs for classes & functions related to
choosing a version

### Related issues
Related to #652

### Testing
Emulator

## Screenshots
<img width="1280" height="720" alt="choose_version_button_unfocused
Large"
src="https://github.com/user-attachments/assets/4f6051ef-b6ae-4fad-9d54-3840523350ed"
/>

<img width="1280" height="720" alt="choose_version_button Large"
src="https://github.com/user-attachments/assets/0e8412bc-2d18-4c6c-987a-2f067363ad2c"
/>

## AI or LLM usage
None
2026-06-07 07:15:30 -04:00
Damontecres
e2a6ae6be4
Two more bug fixes (#1521)
## Description
Fixes bugs:
- Follow up to #1487 since the 404 exception can be ignored in some
cases
- Fixes a only-on-main-thread exception when clearing the secure flag in
some cases

### Related issues
Related to #1469

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-05 10:01:08 -04:00
Justin Caveda
0842c35e34
Fix combined search results losing keyboard focus when typing (#1524)
## Description
Minor tweak to prevent the keyboard from losing focus when typing search
queries when "combine search results" is enabled

### Related issues
Fixes #1523

### Testing
Emulator only

## Screenshots
N/A

## AI or LLM usage
None

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-06-05 09:54:06 -04:00
Damontecres
a0869ca6e4
Several minor fixes (#1505)
## Description
Collecting some minor fixes together:

- Adds error handling when submitting a discover/seerr request,
previously there was no visual feedback if the request failed
- Fix MpvPlayer reporting that it was buffering forever
- Fix discover results row on regular search page not being clickable
- Fix focus loss when returning to movie details after playback advanced
enough to switch the button from Play to Resume
- Fix some focus issues when returning to the TV guide page

### Related issues
Related to #1503 for MPV
Fixes #1500
Fixes #1508
Fixes #1501

### Testing
Emulator & nvidia shield

## Screenshots
N/A

## AI or LLM usage
None
2026-06-03 20:47:07 -04:00
Damontecres
a1b372667b
Fix highlighting the wrong 'more' nav drawer item (#1515)
## Description
Fixes an issue where the wrong nav drawer item would be highlighted in
the "More" section

Previously, displaying the discover nav item was partially handled in
the view model state and partially within the UI code which caused this
bug. This PR moves it all into the view model state.

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-03 20:46:57 -04:00
Damontecres
471dbd62db
Fixes a crash during playback (#1514)
## Description
Fixes a crash that could occur during the beginning of playback

Also adds better handling for clicking next extremely fast

### Technical details

The playlist objects would be created on the IO thread and it had a
`mutableIntStateOf` to track the current index. This meant that there is
a race conditions for the IO thread to commit the snapshot for the main
thread to see them. If the main thread is faster, it will crash.

To fix that, this PR moves the mutable state in `Playlist` into the
`PlaybackState` flow in the view model. This enures both the background
threads and re-compositions have the right state.

### Related issues
Fixes #1509 

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-06-03 12:41:13 -04:00
Damontecres
5ae452155e
Fix showing live tv programs on home page (#1504)
## Description
Fixes the inconsistent live tv programs shown on the home page by using
a different API endpoint & filtering.

Also some UI fixes:
- Use the "Watch live" string consistently for the row instead of it
sometimes switching to "Live TV"
- Adjust the "Ends at" in the home page header to show the actual end
time
- Show the channel name in "quick details"
- Show season & episode number, if applicable, in "quick details"

### Related issues
Fixes #1080

### Testing
Nvidia shield w/ fake EPG data

## Screenshots
N/A, just UI fixes, nothing new

## AI or LLM usage
None
2026-06-03 12:40:53 -04:00
Damontecres
6c64470c28
Only show view more card if row has more items (#1493)
## Description
Only show the view more card at the end of row if there are actually
more items (or at the limit).

Also reduces the size of the arrow a bit

### Related issues
Related to #1392 

### Testing
Emulator with different max items setting

## Screenshots
N/A

## AI or LLM usage
None
2026-05-30 17:41:44 -04:00
Damontecres
68836bb834
Fix click/long click issues on some view more grid pages (#1486)
## Description
On a library recommended tab, if you clicked View More, clicking a card
on the grid would directly play the item instead of the regular
behavior.

This PR fixes that and simplifies the code required to support simple
context menus.

### Related issues
Fixes #1480

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-05-30 17:41:27 -04:00
Damontecres
7660c53e3a
Don't show home row w/ 404 Not Found (#1487)
## Description
If a home page row returns 404 Not Found, treat it as empty and don't
show it.

It will still show as an error on home row settings, since this page
doesn't hide empty rows.

Also fixes a bug where you can't scroll up if there are 3+ empty rows
before the current row.

### Related issues
Closes #1469

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-05-30 16:56:52 -04:00
Damontecres
273a6138c6
Add more sort options to different types (#1488)
## Description
Adds more sorting options, notably premier date & ratings, to different
media types.

### Related issues
Closes #1417
Closes #1429
Replaces #1420

### Testing
Emulator on movie genre's items and music video libraries

## Screenshots
N/A

## AI or LLM usage
None
2026-05-30 16:56:33 -04:00
Damontecres
33161d4d6d
Several bug fixes & minor UI changes (#1466)
## Description
### Bug fixes
- Fixes a race condition crash when configuring subtitle styling before
libmpv is initialized
- Save the clicked item position on grid pages (#1428 & #1462)
- Fix querying the server every 3 seconds for transcode reason if the
video is direct playing


### UI changes
- Makes the title on grid pages slightly smaller
- Makes adjustments to the song list item on now playing so that no
space is used if there's no artist
- Use settings icon instead of triple dots on now playing page

### Related issues
See above

### Testing
Emulator, nvidia shield & google streamer

## Screenshots
### Song list item
Before & after
<img width="199" height="119" alt="image"
src="https://github.com/user-attachments/assets/7fd3636a-d1e4-4b1f-8379-8599068d6309"
/>


## AI or LLM usage
None
2026-05-26 18:36:56 -04:00
Damontecres
8ea6bbbfca
Improvements to home page customization (#1458)
## Description
Adds a few enhancements to home page customization:
- Add option to combined continue watching & next up to split it
- Add option to continue watching and next up rows to combine them
- Add option for sorting playlist or collections
- Show suggestions (recently updated) when searching for a playlist or
collection to add
- Better handling for loading vs unsupported types for suggestions

Also, the old toggle for combining continue watching & next up in
advanced settings is removed. Now by default the rows will be combined
unless changed in the home page customization settings.

### Related issues
Closes #340
Closes #1383
Closes #1350

### Testing
Just on the emulator so far

## Screenshots
N/A

## AI or LLM usage
None
2026-05-26 13:30:00 -04:00
Damontecres
23856ffcf8
Fixes favorites page not loading (#1462)
## Description
- Fixes a bug introduced in #1453 which broke the favorite page
- Follow up to #1428 to refactor the collection folder code to hoist
state up another level
- Fixes resuming playback from series details play button

### Related issues
Fixes #1313
Fixes #1461
Follow up to #1453 & #1428 

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-05-25 20:05:44 -04:00
Damontecres
510160aceb
Fix issue with local trailers, cinema mode, prerolls, & next up (#1460)
## Description
Fixes an issue where local trailers wouldn't play (or show in the queue)
if Cinema Mode is enabled and the server has a preroll/intro.

Also fix building the playback queue when "Show next up" is "Never". The
queue is shown, but not automatically played and next item dialog popup
is never shown. But to indicate playback is over, the controller show.

### Related issues
Fixes #1348
Fixes #1303

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-05-25 16:54:58 -04:00
Damontecres
9eff22e939
Fix several issues with right-to-left locales (#1404)
## Description
Fix several issues when the current locale is right-to-left

- Fixes the backdrop dynamic colors
- Fixes mirroring of playback controls, including seeking

### Related issues
Fixes #1397
Fixes #1398

### Testing
Emulator w/ forced RTL in developer options

## Screenshots
<img width="1280" height="720" alt="rtl_backdrop Large"
src="https://github.com/user-attachments/assets/3e3b14ec-32cc-42c0-a224-d1d859a55acd"
/>
<img width="1280" height="720" alt="rtl_controls Large"
src="https://github.com/user-attachments/assets/79983bb9-e1d0-4712-a5c6-da3d0721db96"
/>


## AI or LLM usage

None
2026-05-25 13:27:34 -04:00