Fixed a bug with libass integration where the background thread responsible for drawing the ASS subtitles (AssRenderThread) has been shut down, but ExoPlayer is still actively running and trying to push video time updates to it. Added fallback for software rendering on older android versions that can have broken OpenGl implementation.This should address much of issue #1049. ## Description Essentially, debug logs showed repeated: 3145 3920 W MessageQueue: Handler (android.os.Handler) {4ba3c72} sending message to a Handler on a dead thread 3145 3920 W MessageQueue: java.lang.IllegalStateException: Handler (android.os.Handler) {4ba3c72} sending message to a Handler on a dead thread Essentially this was a lifecycle bug where the libass-android thread was created, but was detaching from the window, shutting down when it does so. It was still registered to ExoPlayer, but since there was no thread to send to, it just repeatedly kept failing, never spinning back up to display any subtitles. It seems just about any ui change can cause this detachment, but in this case it seems it was right from the moment the loading spinner shows up (making libass-android fail before video starts playing). Fixed by ensuring TextureView's visibility wasn't changed to invisible, which ends up destroying the canvas that libass-android attaches itself to. Hid the canvas using graphicsLayer (so the user can't see it, but it's still alive and active). Also changed resizing logic to prevent Android from seeing a 0x0 TextureView as "destroyed". Since I discovered in testing how terribly my TV's OpenGl was handling this, I added an additional fallback for Android versions < 9. Older TV's can fallback to software rendering when using libass-android. ### Related issues #### Issue #1049 : **Fixes:** - the issue where libass-android (when enabled) fails to load any subtitles in ExoPlayer DirectPlay. **Not Fixed from issue #1049 :** - Issues around accented characters. - Any issues surrounding MPV (I have no way of testing, MPV never worked on any player for me) - Fallback mode (libass-android disabled) where subtitles aren't rendering properly **Added:** - While testing, discovered older Android versions have trouble with reliable OpenGl rendering. Thus I added a fallback for older Android versions to use libass-android in software rendering mode (AssRenderType.OVERLAY_CANVAS) ### Testing - Tested and confirmed flawlessly to work on Android 9 TCL Smart TV (AssRenderType.OVERLAY_CANVAS) - Tested on Android 14 Chromecast (AssRenderType.OVERLAY_OPEN_GL). Slightly less perfect (font not always a match, less fancy shadows) but most ASS/SSA effects work well. May be worth testing other AssRenderType options to compare features and performance on other machines. ## AI or LLM usage Google Gemini Pro in tracing down the cause and fine-tuning the fixes. --------- Co-authored-by: Damontecres <damontecres@gmail.com> |
||
|---|---|---|
| .github | ||
| app | ||
| gradle | ||
| .editorconfig | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| build.gradle.kts | ||
| CONTRIBUTING.md | ||
| DEVELOPMENT.md | ||
| gradle.properties | ||
| gradlew | ||
| gradlew.bat | ||
| LICENSE | ||
| README.md | ||
| renovate.json | ||
| settings.gradle.kts | ||
Wholphin - an OSS Android TV client for Jellyfin
"Never half-phin two jellies. Always wholphin one jelly."
Wholphin is an open-source Android TV client for Jellyfin. It aims to provide a different app UI that's inspired by Plex for users interested in migrating to Jellyfin.
This is not a fork of the official client. Wholphin's user interface and controls have been written completely from scratch. Wholphin supports playing media using either ExoPlayer or MPV.
Features
User interface
- Customize the home page to see the content you are interested in
- Use poster or thumb images, show/hide titles, add/remove/re-order different types of rows!
- A navigation drawer for quick access to libraries, favorites, search, and settings from almost anywhere in the app
- Integration with Jellyseerr/Seerr to discover new movies and TV shows
- Note: only available when installed from GitHub or the Play store
- Option to combine Continue Watching & Next Up rows
- Show Movie/TV Show titles when browsing libraries
- Play theme music, if available
- Customize subtitle style for plain text subtitles
- Search & download subtitles (requires compatible server plugin such as OpenSubtitles)
- Customize layout grids for libraries
- Multiple app color themes
- Protect user profile switches with PIN code
Playback
- Different media playback engines:
- ExoPlayer w/ optional extra audio & AV1 software decoding
- MPV for direct playing anything plus ASS subtitle support
- Plex inspired playback controls:
- Using D-Pad left/right for seeking during playback
- Quickly access video chapters & queue during playback
- Optionally skip back a few seconds when resuming playback
- Live TV & DVR support
- Auto play next episodes with pass out protection
- Option for automatic refresh rate & resolution switching on supported displays
- Trickplay support
- Subtly show playback position along the bottom of the screen while seeking w/ D-Pad
Roadmap
Installation
Using Google Play or Amazon appstore are the fastest way to install. But you can follow these instructions to install without needing an app store
Downloader Code: 8668671
- Enable side-loading "unknown" apps
- https://androidtvnews.com/unknown-sources-chromecast-google-tv/
- https://www.xda-developers.com/how-to-sideload-apps-android-tv/
- https://developer.android.com/distribute/marketing-tools/alternative-distribution#unknown-sources
- https://www.aftvnews.com/how-to-enable-apps-from-unknown-sources-on-an-amazon-fire-tv-or-fire-tv-stick/
- Install the APK on your Android TV device with one of these options:
- Install a browser program such as Downloader, use it to get the latest apk with short code
8668671or URL: http://aftv.news/8668671 - Download the latest APK release from the releases page or http://aftv.news/8668671
- Put the APK on an SD Card/USB stick/network share and use a file manager app from the Google Play Store / Amazon AppStore (e.g.
FX File Explorer). Android's preinstalled file manager probably will not work! - Use
Send files to TVfrom the Google Play Store on your phone & TV - (Expert) Use ADB to install the APK from your computer (guide)
- Put the APK on an SD Card/USB stick/network share and use a file manager app from the Google Play Store / Amazon AppStore (e.g.
- Install a browser program such as Downloader, use it to get the latest apk with short code
Upgrading the app
After the initial install above, the app will automatically check for updates. The updates can be installed in settings.
The first time you attempt an update, the OS should guide you through enabling the required additional permissions for the app to install updates.
Note: if installed via an app store, the app store will handle updates.
Compatibility
Requires Android 6+ (or Fire TV OS 6+) and Jellyfin server 10.10.x or 10.11.x (tested on primarily 10.11).
The app is tested on a variety of Android TV/Fire TV OS devices, but if you encounter issues, please file an issue!
Jellyseerr integration is tested with v2.7.3. Older versions may not work.
Contributions
Issues and pull requests are always welcome! Please check before submitting that your issue or pull request is not a duplicate.
If you plan to contribute, please read the contributing guide!
You can help translate Wholphin!
Acknowledgements
- Thanks to the Jellyfin team for creating and maintaining such a great open-source media server
- Thanks to the official Jellyfin Android TV client developers, some code for creating the device direct play profile is adapted from there
- Thanks to the Jellyfin Kotlin SDK developers for making it easier to interact with the Jellyfin server API
- Thanks to numerous other libraries that make app development even possible