Commit graph

547 commits

Author SHA1 Message Date
Damontecres
2110d846c1
Fix some bugs on discover pages (#1832)
## Description
Fix some bugs on discover pages:
- UI fixes for available seasons
- Fix toggle not updating when removing a season from a pending request
- Don't request images if the path is null
- Better error handling when fetching ratings

### Related issues
Follow up to #1816

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-08-13 13:57:51 -04:00
Damontecres
51ab39ed3b
Several minor bug fixes (#1811)
## Description
Fixes several small bugs and does some minor refactoring:
- Use "Recently Added in XYZ" instead of "Recently recorded" for
recorded tv libraries
- Improve home page query performance by using fewer fields in the query
- When an error occurs connecting to discovered servers, show the error
instead of only logging
- Fix headers sometimes appearing briefly on some pages when navigating
back
- Catch exceptions in socket connections
- Use a larger buffer when downloading updates
- Split up ADB logging for media info

### Related issues
Related to
https://github.com/damontecres/Wholphin/issues/1517#issuecomment-5184316086
Maybe the larger download buffer will help with
https://github.com/damontecres/Wholphin/issues/1696
Will help show the error in #1801
Prevents the crash in #1786

### Testing
Emulator & nvidia shield

## Screenshots
N/A

## AI or LLM usage
None
2026-08-13 12:36:20 -04:00
Damontecres
54966f9124
Handle density configuration changes to prevent unnecessary app restarts (#1828)
## Description
Add `density` to `configChanges` and handle any changes to density that
occur. Thankfully, Compose handles density changes itself, so only
changes where a density calculation is "remembered" needed to be
updated.

Without this, some devices will recreate `MainActivity` when switching
resolutions for playback. That recreation would cause playback to end
immediately.

### Related issues
Fixes #1809

### Testing
Tested on Onn 4k Pro & nvidia shield

I was able to reproduce on the Onn, but not the Shield, so this might be
device and/or API level specific

## Screenshots
N/A

## AI or LLM usage
None
2026-08-12 21:01:28 -04:00
Damontecres
e6304f79a2
Fix requesting new seasons after approval (#1816)
## Description
Fixes requesting additional seasons of a show if a previous request has
already been approved

Now if the previous request is already approved/completed/etc, a new
request will be created instead of trying to update the previous one.
Pending requests will still be updated as before instead of requesting a
new one.

### Related issues
Fixes #1702

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-08-12 16:47:08 -04:00
Damontecres
548ec09af3
Fix issue with scrolling to the right episode if there are specials in the season (#1827)
## Description
Fixes an edge case where clicking on an episode to go to Series Overview
wouldn't scroll to the episode if there is a special (season 0) episodes
in the episode list.

Dev note: to simplify things, if the entire dataset is cached, then just
search with `indexOf`. Often the data is cached because 20 seasons or
100 episodes are fetched initially which covers many shows.

### Related issues
Follow up to #1708 

### Testing
Emulator and unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-08-12 16:25:30 -04:00
Damontecres
c6d81dada8
Fix playlist & collection random sorting on home page (#1820)
## Description
Ensure that a playlist or collection's items are random sorted on the
home page, if applicable.

Previously, the request did sort by random then by sort name resulting
in only sorting by sort name.

However, there are still issues with random sorting in general, see
#1819

### Related issues
Technically fixes #1806
Further bugs in #1819

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-08-12 14:04:19 -04:00
Nehereus
1c0e9a5853
Add a preference option to disable hardware audio offloading (#1564)
## Description
By default, Wholphin plays music with hardware audio offloading enabled.
This delegates audio decoding to the device's hardware DSP, making
playback stability highly dependent on the manufacturer's system audio
implementation. On certain hardware (such as my TCL TVs, e.g., the
Chinese Model Q9L Pro), this implementation causes music playback to
hang indefinitely at 0 seconds.

### Related issues
#1372

### Testing
Tested on a TCL TV (Q9L Pro):
- Some musics playback hangs at 0s with offloading enabled.
- Disabling audio offloading fixes the issues for all medias.

## Screenshots
<!-- Please include screenshots if the PR alters any UI elements -->
<img width="4284" height="5712" alt="IMG_9486"
src="https://github.com/user-attachments/assets/ddf95e68-6ebd-42f9-9565-568de4fbfc42"
/>

## AI or LLM usage
Developed in pair with Gemini and human-reviewed, tested.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-08-11 13:36:03 -04:00
Damontecres
de30c2ccac
Improvements to Now Playing page, including artist backdrops (#1782)
## Description
This PR has updates the Now Playing page.

Now only the song's backdrops and the song's artists' backdrops will
show. First, if the song has any backdrops (probably pretty uncommon),
they will be shuffled and shown, then if the song's artists have
backdrop, those are shuffled and shown. The backdrop changes every 2
minutes unless there's <15s left in the song to prevent rapid changes.
Note: album backdrops and album artists not directly linked to the
specific song are not included.

If a song has a lyrics and the user is scrolling through them, if the
user doesn't scroll for 5 seconds, the focus leaves the lyrics and they
scroll to the current line if available.

Dev note: Both backdrop & lyric updates are refactored to use `Flow`s to
trigger lookups

### Related issues
Fixes #1170

### Testing
Emulator, I need to test it longer term

## Screenshots
N/A

## AI or LLM usage
None
2026-08-11 13:35:20 -04:00
Damontecres
bd1a6c44ee
Add shuffle parameter to playback intent (#1813)
## Description
Adds an optional boolean parameter `shuffle` that is read for the
playback intent. When true, it will cause the resulting media to be
shuffled if applicable.

Something can be shuffled if the `itemId` is a grouping on media such as
a playlist, series, season, or even library.

### Related issues
Depends on #1756

### Testing
Emulator with the documented command

## Screenshots
N/A

## AI or LLM usage
None
2026-08-11 13:33:49 -04:00
calebvetter
c1abb57cd2
Add back stack for deep link navigation (#1756)
## Description
When testing the new deep link feature from this PR
[#1688](https://github.com/damontecres/Wholphin/pull/1688)
I noticed that the back button would close the app. As in, all routes
are cleared and only the playback is in the nav stack.

I figured a more desirable behavior would be to create a nav stack,
always starting with the home screen, then also inserting the media
item's details page, if available.

To achieve this, I made the return Target.destinations a list of
destinations, and updated the other two uses in IntentService.

Open to implementation tweaks, or scrap it if this isn't how it should
work, haha.

### Testing

Tested deep links, which produced the following nav stacks:
- Movie view
  - Home → Movie details
- Movie playback (with and without position)
  - Home → Movie details → Playback
- Series view
  - Home → Series details
- Season view
  - Home → Season details
- Episode view
  - Home → Episode details
- Episode playback (with and without position)
  - Home → Episode details → Playback
- Trailer/extras playback (no details page available)
  - Home → Playback
- TV channel view
  - Home → Playback
- TV channel playback
  - Home → Playback

## AI or LLM usage
AI was used to generate the initial code, debug and test, then manual
refactoring and cleanup was done.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-08-11 10:59:20 -04:00
Stefan Bullones
a0966dd05a
Fix alphabet highlight for names starting with "The " (#1788)
## Description
The alphabet scroll bar highlighted the letter of an item's *display*
name while the grid sorted by the server's article-stripped `SortName`,
so "The Beatles" sat under **B** but highlighted **T**.

- **Artists:** the Artists tab never requested `SortName`, so the
highlight silently fell back to `Name`. It now asks for `SlimItemFields`
(which already includes `SORT_NAME`), matching the sibling `/Items`
branch. The count-only query used for letter positions passes `fields =
null`, since a `limit = 0` request has no use for them.
- **Genres and studios:** these grids bucketed on the display name
unconditionally. The sort-name fallback is extracted as
`BaseItemDto.alphabetSortName` (`sortName ?: name ?: ""`) and carried
onto the `Genre` and `Studio` grid items, so all three grids now derive
the letter from one value.

### Related issues
https://github.com/damontecres/Wholphin/issues/1787

### Testing
Two unit tests added:
- `CollectionFolderViewModelTest` pins that the artist pager actually
requests `SORT_NAME` — the field whose absence caused the bug.
- `AlphabetSortNameTest` covers both branches of the `alphabetSortName`
fallback.

Manually: select a music library → Artists tab → put the cursor on an
artist starting with "The " and confirm the highlighted letter matches
the grid position. Same check on the genre and studio grids.

## AI or LLM usage
I used Cursor for debugging and implementing the fix, and Claude Code
for a follow-up cleanup pass over the diff.
2026-08-10 21:52:43 -04:00
Damontecres
454c0212b6
Fix issues with external subtitles & transcoding (#1790)
## Description
Fixes a bug where the external subtitle track would not be activated if
playback is transcoded

Also fixes a bug where external subtitles would cause MPV to incorrectly
switch to transcoding

### Related issues
Fixes #1778

### Testing
Emulator with files that have a variety of external SRT, embedded SRT &
ASS, & embedded PGS

## Screenshots
N/A

## AI or LLM usage
None
2026-08-10 20:17:42 -04:00
Damontecres
7581b189aa
Fix preference text overflow/clipping (#1785)
## Description
Removes the max height constraints for slider preferences and navigation
drawer preferences so that longer text (possibly in other languages or a
long library name) won't cut off any content

### Related issues
Fixes #1784 

### Testing
Emulator with manual long text

## Screenshots
N/A, no significant change except sliders can be slightly taller if
needed

## AI or LLM usage
None
2026-08-04 11:01:19 -04:00
Stefan Bullones
d7d63f52c3
Fix the alphabet buttons scroll bar on the Artists tab (#1775)
## Description
positionOfLetter counted through /Items no matter which endpoint the
grid was actually paging. A music library's Artists tab pages /Artists,
so the index it returned had counted every album and song before the
letter - an order of magnitude more rows than the artist grid holds -
and every letter jumped to the last row.

Count through the same endpoint createPager builds its pager from:
/Artists for the ARTIST override, /Items for NONE. The artist request is
now built once in createGetArtistsRequest and shared by both, so the two
cannot drift apart.

GetPersonsRequest has neither nameLessThan nor startIndex, so /Persons
cannot be counted up to a letter at all; the PERSON override returns
null, which the call sites already map to the "no jump" sentinel. That
path is unreachable today - the only PERSON tab sorts by
ItemSortBy.DEFAULT, so showLetterButtons is never true there and
AlphabetButtons is never composed.

### Related issues
https://github.com/damontecres/Wholphin/issues/1774

### Testing
Select a music library -> Go to Artist tab -> Select a letter on the
right side alphabet scroll bar

## AI or LLM usage
I used Cursor and Claude Code for planning, implementation and code
review.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-08-03 09:54:03 -04:00
Damontecres
6ad96865e7
Fix live tv & recorded tv playback (#1770)
## Description
#1654 broke playback for both live TV and recorded programs in `.ts`
format.

This PR fixes both issues! Jellyfin returns `NoCompatibleStream` for
live tv if the source ID is passed in, so that is now skipped for live
tv. `.ts` files may have IDs formatted with a slash instead of colon, so
the logic is updated to handle that plus fallbacks for potentially
unknown future formats.

### Related issues
Fixes #1767

### Testing
Emulator & nvidia shield, plus unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-08-02 11:11:32 -04:00
Damontecres
8bae9c7f23
Fixes for error handling, UI padding, & more (#1759)
## Description
Another collection of small individual fixes that don't warrant a full
PR:
- Better error handling for series and collection detail pages
- Better error handling on Discover search tab
- Fix issues when changing view options on card grid without reloading
the page
- Better error handling when changing the refresh rate or resolution
- Fix some nav drawer items disappearing briefly when restarting the app
- Fix that the discover search row would not clear when the query is
cleared

And some UI tweaks:
- Use consistent padding for the different customize home page sections
- Convert the "Continue watching click behavior" setting from a toggle
to choice dialog (the options & behaviors have not changed)

### Related issues
I think the error handling when changing the refresh rate might help
with #1737

### Testing
Emulator mostly

## Screenshots
N/A, UI changes are minor

## AI or LLM usage
None
2026-07-29 10:21:49 -04:00
Stefan Bullones
438c9dd704
Selecting a song on the search page navigates to a song's album with the song focused (#1661)
## Description
Selecting a song from search now resolves to its album's detail page,
scrolled to and focusing that song, instead of sending you to an
"unsupported item type" page. Implemented in the shared
BaseItem.destination() rather than in search specifically, so any caller
that navigates to a song gets the same behavior.

A song with no albumId plays directly while remaining in the search
results page: NavigationManager.navigateTo() intercepts a bare AUDIO
destination and hands it to a new MusicService.playSong(). Handling this
in the single navigation funnel means every caller gets it for free with
no loading-screen flash.

Adds BaseItemDestinationTest covering the new destination() logic.

### Related issues
https://github.com/damontecres/Wholphin/issues/1656

### Testing
Device: Sony Bravia 4K VH21

#### Tests on a search results page, song with albumId:
1. Select a song sends you to album page with cursor on song. Another
press plays it
2. Back button brings you back to search results.

Tested with both songs at the start of an album and songs deep into a
100+ songs album.

#### Tests on a search results page, song with no albumId:
1. Select a songs plays the song while staying in the search results
page. No loading screen.

## AI or LLM usage
I used Cursor and Claude Code for planning, implementation and code
review.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-07-28 18:45:02 -04:00
Damontecres
79cb93db08
Fixes to artist detail page (#1762)
## Description
Fixes an incorrect query for an artist's albums (thanks @StefanBS for
reporting & fixing in #1761!)

Additionally, another album row for "Appears on" is added. This is
definitely necessary because Wholphin only has a tab for all artists
which includes artists featured on albums attributed to a different
artist. So those albums will now show in the "Appears on" similar to the
web UI instead of an empty artist page.

Finally, the long-click context menu is added for music videos on an
artist's page.

### Related issues
Fixes #1760
Replaced #1761 

### Testing
Emulator, particularly with artists who are not album artists

Also, verified the query fix against the web UI dev console

## Screenshots
N/A

## AI or LLM usage
None, but the fix included from #1761 did use some AI

---------

Co-authored-by: Stefan Bullones <stefan.bullones@gmail.com>
2026-07-28 15:17:57 -04:00
Steve Smith
bf43a41405
Correct sort order when "Date Played" is selected in TV library. (#1746)
## Description
The TV library page offers the option to sort by date played, however
when selected it reverts to the default (alphabetical). This appears to
be due to the use of `ItemSortBy.DATE_PLAYED` rather than the correct
`ItemSortBy.SERIES_DATE_PLAYED`. See
[BrowseGridFragment](https://github.com/jellyfin/jellyfin-androidtv/blob/master/app/src/main/java/org/jellyfin/androidtv/ui/browsing/BrowseGridFragment.java#L169)
for the usage in the official Android TV client.

### Related issues
N/A

### Testing
Emulator against personal Jellyfin server.

## Screenshots
N/A

## AI or LLM usage
None
2026-07-27 12:43:47 -04:00
Damontecres
f16a7bb6d6
Fix trying to fetch images with zero fillWidth (#1753)
## Description
The bug report was caused by a race condition where the image URL was
built before the grid was fully laid out causing a `fillWidth=0` and the
`remember` would not reset after the `fillWidth` was updated to the
actual value. So this PR fixes the `remember`.

Furthermore, some extra guards are added to only pass the `fillWidth` &
`fillHeight` params if greater than 0.

Finally, the `EpisodeCard` code is deleted because it's height & width
logic was overly complicated and `BannerCardWithTitle` provides better
functionality anyway.

### Related issues
Should fix #1751
Maybe #1156 is also fixed by this

### Testing
Emulator, but I haven't been able to reproduce the race condition, but
the fix makes sense given the bug report

## Screenshots
N/A

## AI or LLM usage
None
2026-07-26 16:36:49 -04:00
Damontecres
9954365c6f
Add two new themes: Red & Brown (#1721)
## Description
Adds new two new theme colors: Red & Brown

### Related issues
Related to #91, #950
Closes #1646

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

## Screenshots
<img width="2727" height="2171" alt="image"
src="https://github.com/user-attachments/assets/ae19f98d-e782-466a-bafc-6c0502f64e00"
/>

## AI or LLM usage
None
2026-07-25 22:52:09 -04:00
Damontecres
e7b0be2660
Display server error message on server list (#1741)
## Description
On the switch server page, display error message at the bottom for the
focused server. This includes unsupported server version.

### Related issues
Jellyfin 10.11/12.0 support discussion: #1640

### Testing
Emulator

## Screenshots
<img width="1280" height="720" alt="server_error Large"
src="https://github.com/user-attachments/assets/1227e7e7-a364-48d9-9a77-cb3f78d134a1"
/>

## AI or LLM usage
None
2026-07-25 22:52:02 -04:00
Damontecres
4171d0b861
Minor UI changes to playlist details page (#1749)
## Description
Makes some minor changes to the playlist details page
- Center playlist name
- Show duration with seconds for songs
- Adjust some padding

Also fixes an issue where focus could be lost when leaving the page
while focused on a playlist item

Dev note: bulk of the change in thie PR is refactoring the `LazyColumn`
of playlist items into its own composable

### Related issues
N/A

### Testing
Emulator

## Screenshots
N/A, the changes are very minor

## AI or LLM usage
None
2026-07-25 16:13:31 -04:00
Damontecres
26a23d673b
Add option for dpad skipping with no seek bar (#1742)
## Description
Adds a third option for d-pad seeking to not show any seek bar which
only shows the skip indicator and not the seek bar along the bottom

### Related issues
Original work to add other mode in #1650
Closes #1520

### Testing
Emulator testing

## Screenshots
<img width="546" height="347" alt="image"
src="https://github.com/user-attachments/assets/2872566e-4598-4284-92cb-95a45b307835"
/>

## AI or LLM usage
None
2026-07-25 16:10:00 -04:00
calebvetter
cf3c00a1e1
Add option for trickplay preview mode when D-Pad seeking (#1650)
## Description
Adds a setting to allow the user to choose between the current D-Pad
skip functionality, and a new simple trickplay overlay.

The setting is added in Advanced, under the Playback section, called
"D-Pad seek mode". The options are "Skip time" and "Trickplay previews".
I left the default as "Skip time" since that's how it operates now, and
nothing would change for users after this option is added unless they go
and set it.

When "Trickplay previews" is enabled, it shows an simple overlay when
using the D-Pad to seek (without the full overlay open). The new simple
overlay is the same implementation of the components in the full
overlay: seekbar, trickplay images, current playhead time, remaining
time. The components were pulled from the full overlay's inline UI code
into their own reusable components, now used in both the full overlay
and the simple overlay.

#### Notes
I could see there being an adjustment for the overlay hide delay. It's
currently hard coded to 1.5s.

This could be the default method, but it seems like preference is split
as to whether people want this, or the minimalistic skipped seconds only
version.

### Related issues
This is directly in response to this issue, as well as my own desire for
the feature :)
https://github.com/damontecres/Wholphin/discussions/1084

It's also loosely related to this issue, in that it would solve it since
it shows the playhead and remaining times.
https://github.com/damontecres/Wholphin/discussions/1122

### Testing
Built and tested on an Amazon Fire TV Stick 4K Max. I wouldn't
anticipate and compatibility or performance changes since it's a simple
settings/UI change involving already-used UI components.

## Screenshots
<img width="1920" height="1080" alt="wholphin-20260630-155708"
src="https://github.com/user-attachments/assets/52046cc2-7413-4f66-89dd-355464fa0f91"
/>
<img width="1920" height="1080" alt="wholphin-20260630-155723"
src="https://github.com/user-attachments/assets/57a4a271-9e44-4d2a-bea3-ce5c9cdc731a"
/>
<img width="1920" height="1080" alt="wholphin-20260630-153825"
src="https://github.com/user-attachments/assets/2cf664ff-3db5-4a2e-8626-10219946669c"
/>


## AI or LLM usage
AI was used to generate the change, automate some testing, and provide
information surrounding the change. I manually did some refactoring and
cleanup to keep it clean and consistent with the rest of the code
conventions.

---------

Co-authored-by: Damontecres <damontecres@gmail.com>
2026-07-23 15:32:40 -04:00
Damontecres
d2bf5cd1e2
Fix library freeze if first item's title starts with a character not in the alphabet string (#1740)
## Description
A library's grid page tries to highlight the first letter of the focused
item. But if the first letter was a not in the alphabet string (which
varies by language), a exception was thrown on the main thread causing a
freeze.

This PR ensures only a non-negative index is highlighted on the letter
buttons.

### Related issues
Fixes #1361
Need to create an issue to improve alphabet letter button handling for
non-English alphabets

### Testing
Emulator, I manually passed a non-`[0-9A-Z]` character to replicate the
freeze

## Screenshots
N/A

## AI or LLM usage
None
2026-07-23 15:32:31 -04:00
Damontecres
5bc874a9ff
Fix music artist listing & show music in collections (#1739)
## Description
Switches to use the Artists API instead of Items API when fetching the
list of artists in a library.

Enables fetching artists, albums, and music videos in a collection.

Also adds titles for the remaining `BaseItemKind` types for future
proofing even if they aren't used anywhere in the app.

### Related issues
Fixes #1733
Fixes #1734
Fixes #1735


### Testing
Emulator, created a new collection with the above. Also verified the
artist query against the web UI

## Screenshots
N/A

## AI or LLM usage
None
2026-07-23 14:23:48 -04:00
Damontecres
00490b14ec
Improvements to subtitle search & download (#1728)
## Description
Changes to searching & downloading subtitles:
- Activating newly downloaded subtitles more reliably
- Better audio index adjustment checks after downloading subtitles
- Sort subtitle downloadable options by whether the file hash matches
first
- Update the UI for subtitle downloadable options

Also, some improvements to the subtitle choice dialog:
- It now loops from top to bottom (and vice versa)
- It now focuses initially on current choice

### Dev notes
This PR now the selected tracks from `state.currentItemPlayback` to
`state.currentPlayback`. `currentItemPlayback` now only reflects the
user's choices saved in the database instead of a combination of DB and
"actual" state. `currentPlayback` stores the actual, resolved track
indexes regardless of how they were derived.

This means the indexes values in `state.currentItemPlayback` and
`state.currentPlayback` may be different. For example, if the user has
chosen "Only forced", `state.currentItemPlayback==-3` but
`state.currentPlayback` might be an actual forced track index.

### Related issues
Fixes #1549
Fixes #1718
Closes #1723
Fixes bug reported in
https://github.com/damontecres/Wholphin/issues/1498#issuecomment-5019965271

### Testing
Emulator

## Screenshots

Now shows SDH & hash matching

<img width="779" height="280" alt="image"
src="https://github.com/user-attachments/assets/4c33e5af-c9a1-4c9c-8217-6bc2ab3fcd27"
/>

## AI or LLM usage
None
2026-07-23 13:30:43 -04:00
Damontecres
48005ce67a
Updates to chapter card UI (#1729)
## Description
Changes the chapter cards to use the chapter's image's aspect ratio
instead of forcing the video's aspect ratio. These ratios can be
different sometimes often for "dummy" chapters.

Also, the font size for the chapter name & position is reduced a bit.

### Related issues
N/A

### Testing
Emulator

## Screenshots
<img width="873" height="193" alt="image"
src="https://github.com/user-attachments/assets/e1c0e8a8-2e37-4644-bc99-899e20c4af09"
/>

## AI or LLM usage
None
2026-07-21 17:21:07 -04:00
Damontecres
0a4ab7a547
Several UI fixes (#1730)
## Description
- Fixes not scrolling to the last season on series overview if there is
a Specials season
- Apply the "bouncing" fix from #1543 to all applicable card types
- Fix card images not automatically reloading when changing image type
on grid pages
- Get rid of the sticky headers which overlap items on view options
dialogs and use a fixed header as elsewhere in the app

### Related issues
Related to #1708 which didn't introduce the bug, but made it much more
likely to occur

### Testing
Emulator & unit tests

## Screenshots
N/A, the sticky header UI changes are very minor

## AI or LLM usage
None
2026-07-21 17:20:59 -04:00
Damontecres
b1f9c32a19
Parse intents to search, view, or play media (#1688)
## Description
Adds parsing for intents to search, view, or play media based on the
action and parameters. This allows for remotely opening Wholphin and
starting playback.

This is considered experimental, so the syntax or behaviors may change!

See the `Intents.md` file in this PR for syntax and examples.

### Related issues
Replaces https://github.com/damontecres/Wholphin/pull/738
Closes https://github.com/damontecres/Wholphin/discussions/1095

### Testing
Emulator with the test commands in the docs

## Screenshots
N/A

## AI or LLM usage
None
2026-07-20 10:04:34 -04:00
Damontecres
4f5cd3e7b1
Fix errors when a plural translation is missing (#1716)
## Description
Previously not every plural translation had full coverage and some did
not have the fallback "other" quantity translation. So for some
languages this would cause an error when trying to display the string
depending on the quantity. This PR ensures every plural translation has
the "other" fallback.

Note: the "other" fallback is copied from an existing translation so I'm
sure some will not be grammatically correct!

Dev note: I used a python script to parse and fix the entries, so it
also rewrote some of the unrelated `CDATA` entries.

### Related issues
Fixes #1676

### Testing
On the emulator, I reproduced the error in the issue with the Danish
translation, verified it was fixed after the patch was applied

## Screenshots
N/A

## AI or LLM usage
None
2026-07-18 17:52:16 -04:00
Damontecres
35c4d13f8f
Various minor bug fixes (#1707)
## Description
Gathering several small bug fixes:
- Clear the backdrop when manually reloading the home page
- Convert the "# years old" string resource to plural
- Fix a spelling error in the source English strings
- Ensure #1680 is respected when searching for subtitles to download
- Slightly adjust padding for the header in collection details to match
other headers

### Related issues
Fixes string issues reported in
https://github.com/damontecres/Wholphin/issues/1705#issuecomment-4982909931

### Testing
Emulator

## Screenshots
N/A

## AI or LLM usage
None
2026-07-18 17:50:35 -04:00
Damontecres
3cc2bf2dd1
Fix resume query for Jellyfin 12 (#1715)
## Description
Fixes querying for resume item (continue watching) for Jellyfin 12 so
that whole series are not included. The patch is also compatible with
Jellyfin 10.11.

### Related issues
Fixes #1689

I couldn't find an issue in Jellyfin that mentions this behavior change,
so I'm guessing it was a side effect. But since the old query did ask to
include Series, I don't think it's a bug in the server.

### Testing
Manual API queries & emulator on both Jellyfin 11 & 12-rc2 servers

## Screenshots
N/A

## AI or LLM usage
None
2026-07-17 11:23:31 -04:00
Damontecres
ed97fc3009
Add context menu to search page (#1701)
## Description
Adds long clicking search results to show the context menu. It's the
same context menu as elsewhere in the app.

### Related issues
Closes #1695

### Testing
Emulator to toggle favorite and watched status on various types

## Screenshots
N/A

## AI or LLM usage
None
2026-07-16 11:36:07 -04:00
Damontecres
a350fa2017
Improvements to "Add to playlist" dialog (#1706)
## Description
Fixes & improves the "Add to playlist" dialog:
- Added searching by name
- Playlists are sorted by recently updated
- No longer filters by media type
- Filters based on user's permission for the playlists

The behavior is now consistent with the web UI's list except for the
sort

### Related issues
Should fix #1124

### Testing
Emulator testing

## Screenshots
N/A

## AI or LLM usage
None
2026-07-16 11:35:48 -04:00
Damontecres
39c030c1d5
Fix loading a canceled discover tv show (#1709)
## Description
#1614 added filtering by a TV production status. I pulled the enum
values from a comment in Seerr's code which spelled it as `Cancelled`,
but the actual API uses `Canceled`. This PR corrects the spelling.

Also, since this value isn't actually used yet, I've removed it from
`TvDetails` for now.

### Related issues
Fixes #1703

### Testing
Emulator, filter by production status as canceled and open any result

## Screenshots
N/A

## AI or LLM usage
None
2026-07-16 11:35:32 -04:00
Damontecres
c2aab06c0b
Save sort & filter within a genre or studio (#1711)
## Description
Saves the sort and filter of items within a genre or studio
(Movies->Genres tab->Click genre) across genres or studios. So if you
open "Action" movies and change the sort, the sort will be used for
"Animation" or "Horror" movies.

This is saved separate from the sort/filter on the Library tab.

### Related issues
Closes https://github.com/damontecres/Wholphin/issues/1253

### Testing
Emulator by switching sorts

## Screenshots
N/A

## AI or LLM usage
None
2026-07-15 20:25:43 -04:00
Damontecres
84f6035103
Fix bug finding the episode to scroll to on Series Overview (#1708)
## Description
Fixes an off-by-one error when searching for the right episode (or
season) to scroll to on the series overview page.

While the code works most of the time, on cases where a special appears
_after_ a season is included, the final episode in the season not be
scrolled to. For example, if Special S00E04 comes after Season 2 (which
has 10 episodes), clicking on S02E10 on the home page won't scroll to
that episode on the series overview, instead S02E01 will be focused. And
S00E04 will appear at the end of the list.

This should also be a very, very tiny performance boost since the
"search the whole list" fallback won't be triggered as often. I also
added some comments to explain the function better.

### Related issues
N/A, just noticed it yesterday

### Testing
Emulator in the situation described above

## Screenshots
N/A

## AI or LLM usage
None
2026-07-15 18:45:32 -04:00
Damontecres
46b2f2839f
Fix compile error from merging #947 & #1680 (#1700)
## Description
Fixes [compile
error](https://github.com/damontecres/Wholphin/actions/runs/29357259594/job/87167912698)

### Related issues
Resulted from merging #947 & #1680 together into main

### Testing
Compiled & unit tests

## Screenshots
N/A

## AI or LLM usage
None
2026-07-14 15:35:49 -04:00
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