## 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
## 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 & #1484Fixes#1617
Fixes
https://github.com/damontecres/Wholphin/issues/1329#issuecomment-4440684328
### Testing
Just on the emulator
## Screenshots
N/A
## AI or LLM usage
None
## 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
## 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.
## 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
## 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
## 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
## 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
## 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
## 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
## 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>
## 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
## 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
## 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
## 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#1451Closes#1507
### Testing
Emulator from library pages & series detail pages
## Screenshots
N/A
## AI or LLM usage
None
## 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
## 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#1528Fixes#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
## 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
## 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
## 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
## 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
## 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
## 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>
## 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#1500Fixes#1508Fixes#1501
### Testing
Emulator & nvidia shield
## Screenshots
N/A
## AI or LLM usage
None
## 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
## 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
## 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
## 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
## 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
## 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
## Description
Adds more sorting options, notably premier date & ratings, to different
media types.
### Related issues
Closes#1417Closes#1429
Replaces #1420
### Testing
Emulator on movie genre's items and music video libraries
## Screenshots
N/A
## AI or LLM usage
None
## 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
## 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#340Closes#1383Closes#1350
### Testing
Just on the emulator so far
## Screenshots
N/A
## AI or LLM usage
None
## 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#1313Fixes#1461
Follow up to #1453 & #1428
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## 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#1348Fixes#1303
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## Description
Prefer using thumb image types for movies when adding to Watch Next
android OS channel. The primary/poster image will be used if there is no
thumb.
### Related issues
Fixes#1425Fixes#1403
### Testing
Emulator, verified a movie was showing its primary image, then ran this
PR
## Screenshots
N/A
## AI or LLM usage
None
## Description
- Fix crash on license info page for release builds (#1437)
- Fix configuring which ratings to show by default (#1407)
- When re-ordering nav drawer items, ensure the one that was just moved
is always visible (#886 )
- Fix app losing focus when switching between list layout types (#1428)
- If the version doesn't have any additional commits, don't show the git
hash info (ie `v0.6.4-0-gabc1234` shows as `v0.6.4`)
- Adds tests for Version comparisons & toString
### Related issues
See above
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## Description
Refactors all usages of `LiveData` into flows in keeping with best
practices. This also includes refactoring several `ViewModel`s to
combine multiple `LiveData` into a new single `StateFlow`.
There are no user facing changes
### Related issues
None
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## Description
Adds an option to display libraries in a list layout
The list can be regular showing 6-7 items or compact showing ~11 items.
Can also toggle showing the details on the left side. Movies, tv shows,
& albums have type-specific layouts and other types like videos, music
videos, etc use a generic one similar to movies.
Another change is that showing the backdrop is now a separate toggle
from showing details for both grid & list layouts.
Sorting, filtering, & jumping to a letter all work as expected!
### Related issues
Closes#1101
### Testing
Emulator mostly
## Screenshots
<details><summary>Click for screenshots</summary>
<p>
### TV shows list
<img width="1280" height="720" alt="series_list Large"
src="https://github.com/user-attachments/assets/f8f9b801-e537-4cdf-b992-f2f1259457fa"
/>
### TV shows compact list
<img width="1280" height="720" alt="series_list_compact Large"
src="https://github.com/user-attachments/assets/747e5929-90d7-4d59-a179-bc3210ac01b9"
/>
### Movie list
<img width="1280" height="720" alt="movie_list Large"
src="https://github.com/user-attachments/assets/ee3e1c6c-fb25-438a-a11e-522d30fbaabf"
/>
### Album list
<img width="1280" height="720" alt="music_list Large"
src="https://github.com/user-attachments/assets/9b1f59ec-c237-4ab2-9b51-6cb519f5327c"
/>
</p>
</details>
## AI or LLM usage
None
## Description
Shows a loading indicator and slightly dim the screen when playback is
buffering.
Showing the indicator is delayed in case the buffering doesn't take very
long.
Dev note: the changes to `MpvPlayer` need to be ported to
wholphin-extensions as well.
### Related issues
Closes#1411
### Testing
Emulator
## Screenshots
[buffering.webm](https://github.com/user-attachments/assets/dd848696-d6de-4f68-94e4-901bb5db1185)
## AI or LLM usage
None
## Description
Adds a setting to configure the app's language/locale. It is configured
per user. This settings has no impact on audio or subtitles language
choices.
Only languages Wholphin has translations for can be used. If you would
like to contribute new translations, check out
https://translate.codeberg.org/projects/wholphin/!
Dev notes: This doesn't exactly follow Android's recommendations because
the [guidelines are for
per-app](https://developer.android.com/guide/topics/resources/app-languages)
and not users within the app.
### Related issues
Closes#513Closes#669
### Testing
- Emulator API 34
- Nvidia shield API 30
- Fire TV OS 7 API 28
## Screenshots
<img width="1280" height="720" alt="language Large"
src="https://github.com/user-attachments/assets/bf1c0962-8a36-4012-aed9-eab564fc1114"
/>
## AI or LLM usage
None
## Description
There was an issue if when opening a page with theme music and quickly
changing pages, usually playback, the theme music might play on the new
page. This is because the call to stop the theme music could potentially
happen _before_ the song was loaded or had started playing.
This PR fixes this race condition by tracking the job that's fetching
the theme song and by adding a mutex to ensure the play function
completes before the stop function can begin.
### Related issues
Fixes#938
### Testing
Emulator w/ fake delay to increase the odds of the issue occurring
## Screenshots
N/A
## AI or LLM usage
None
## Description
Don't show future content (episodes, etc) on recently released rows in
recommended tabs or home page rows.
### Related issues
Closes#262
Replaces #1262
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
The original PR #1262 author used claude. Some of that code that was
retained in this PR was reviewed & tested.
---------
Co-authored-by: ADT95 <turner7@outlook.com>
## Description
This should fix the issue where suggestions would sometimes get stuck
loading. My best guess is that they were getting stuck because the app
thought it was still loading, even though the background job was just
waiting.
This should fix that by making each library kick off its own suggestions
job when needed.
### Related issues
Fixes#1065
### Testing
Emulator and nvidia shield
## Screenshots
N/A no ui changes
## AI or LLM usage
Used codex to help diagnosis the bug. Also added unit tests and more
debug logging for the suggestions system using ai. Wrote the fix myself.
---------
Co-authored-by: Damontecres <damontecres@gmail.com>
## Description
Fixes showing the discover search result row
Also adds a Search tab to the discover page. You can already search
discover results from the regular search page, so the new tab is just
for convenience.
### Related issues
Related to #709
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None
## Description
- Fix always showing the user list on app cold start even with auto sign
in enabled
- Ignore unknown JSON keys when restoring view options or filters from
the database making them more backward compatible for devs switching
branches
- Don't show a view more card on collection detail page rows, it's not
necessary
### Related issues
First bug was introduced by #1367
### Testing
Emulator
## Screenshots
N/A
## AI or LLM usage
None