Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: android tv #598

Merged
merged 136 commits into from
Dec 30, 2023
Merged

feat: android tv #598

merged 136 commits into from
Dec 30, 2023

Conversation

jarnedemeulemeester
Copy link
Owner

@jarnedemeulemeester jarnedemeulemeester commented Dec 29, 2023

It's finally time to merge the Android TV code back to the main branch.
There are still some things that need to be implemented. But these will come in smaller separate PRs.

Here is a quick overview of all the features currently implemented:

Home

The home screen displays the "Continue Watching", "Next Up" and latest items of each library with progress indicators.
At the top are three tabs. Of these three only search has not been implemented yet.
Settings are accessed using the profile button at the top right.

home

  • Continue Watching
  • Next Up
  • Latest

Libraries

Shows a list of all the libraries the user has access to. Currently does not implement a way to sort or filter.

libraries

  • List of libraries
  • Sort / filter

Library

Displays a list of movies or shows with watched indicators. Does not have a way to sort or filter yet.

library

  • List of movies / shows
  • Sort / filter

Movie

Displays all the expected information except for metadata chips and cast & crew.
You can play the movie, watch the trailer, mark as played or add to favorites.

movie

  • Title
  • Original title
  • Metadata chips
  • Production year
  • Runtime
  • Official rating
  • Community rating
  • Overview
  • Play
  • Watch trailer
  • Mark as watched / favorite
  • Genres
  • Director
  • Writers
  • Cast & Crew

Show

Same as the movie screen but also lists the seasons.

show

  • Same as movie
  • Seasons

Season

Lists all episodes in the season with progress indicators and watched status.
Does not have the ability to sort or filter yet.
I will probably also add a feature to automatically scroll to the next up episode.

season

  • Title
  • Show name
  • List of episodes
  • Sort / filter

Player

Play and pause the media, change audio or subtitle tracks and seeking are all implemented.
There is currently no way to completely disable the audio or subtitles.
Skip intro and trickplay will also be added later.

player

  • Play / pause
  • Change audio track
  • Change subtitle track
  • Seek
  • Skip intro
  • Trickplay

Settings

Currently there are only a few settings available.

  • Change the preferred language of the audio and subtitle tracks.
  • Use mpv as the player.
  • Switch user and or server.
  • Enable or disable the image cache.

settings

  • Language
  • Appearance
  • Player
  • Users
  • Servers
  • Device
  • Network
  • Cache
  • About

Servers

Lists all configured servers.
Discovered server are shown in the same list.
Add a server by manually typing in the server address.

servers
addserver

  • List of servers
    • Display the server address
  • Server discovery
  • Add server
  • Delete server

Users

Lists all configured and public users.
Log in using username / password or via Quick Connect (not shown in screenshot because the demo server does not have Quick Connect enabled).

users
login

  • List of users
  • Add user / login
  • Delete user

Closes #23
Closes #534

# Conflicts:
#	gradle/libs.versions.toml
# Conflicts:
#	.github/workflows/build.yaml
#	gradle/libs.versions.toml
# Conflicts:
#	gradle/libs.versions.toml
kotlin 1.9.20 -> 1.9.21
ksp 1.9.20-1.0.14 -> 1.9.21-1.0.15
compose-compiler 1.5.5 -> 1.5.6
compose-compiler 1.5.6 -> 1.5.7
New sub settings screen with different layout
Settings detail select card to select an option
Courtesy of Android TV JetStreamCompose sample
@jarnedemeulemeester jarnedemeulemeester merged commit 7171ec7 into main Dec 30, 2023
4 checks passed
@drizzt09
Copy link

this looks beautiful.
What is timeline of apk release?

@jothi-prasath
Copy link

🎉🎉

@Betalos
Copy link

Betalos commented Jan 8, 2024

@drizzt09 I guess it still far away, I tried the debug build in chromecast with Google tv, the playback is not working, also some minor navigation issues.
So I guess it still need some ironing before release.

@EnduringGuerila
Copy link

I compiled and installed tv-libre-armeabi-v7a-debug.apk on our Sony Bravia running android 10.
I'd love to provide feedback somewhere if it'll help development.

@ayykamp
Copy link

ayykamp commented Jun 3, 2024

The TV UI looks really good :) Only thing is that the posters should maybe be displayed when viewing a single movie/show and not just the background image.

ghost pushed a commit to pruthvi-21/findroid that referenced this pull request Jul 22, 2024
* Add AddServerScreen

* Upgrade androidx-compose-material3 and androidx-compose-ui to alpha

* Add DiscoveredServerComponent

* Show discovered servers

* Add navigation using compose-destinations

* Implement Loginscreen

* Start of HomeScreen

* Use coil for home screen images and update layout with spacers

* Select correct startRoute based on conditions

* Upgrade compose material3 to 1.1.0-alpha05

* Add series title, max 1 line, padding

* Upgrade dependencies

* Switch to TvLazyColumn and TvLazyRow

* Add header to `HomeScreen`

* Add progress bar to Continue watching items

* Limit the number of lines under Movie or Show and use correct episode text

* chore: run ktlintFormat

* ci: assemble tv

* feat: `LibraryScreen`

* fix: update to reworked items system

* chore(deps): update androidx-paging-compose and compose-destination

Also fix lint issue on HomeScreen

* feat: start using androidx.material3 composables

* feat: add coil svg

* feat: experimenting with cards

* lint: fix linting issues

* feat: server select screen

* build: upgrade dependencies

* lint: run ktlintFormat

* feat(ServerSelectScreen): add "No servers found" text

* feat: update AddServerScreen

* feat: implement `UiText.asString()` composable

* lint: run ktlintFormat

* refactor(phone): remove livedata from `ServerSelectScreen`

* feat: add `UserSelectScreen`

* feat(UserSelectScreen): load user's profile picture

* feat: update LoginScreen

* feat: update progress indicator on `AddServerScreen`

* fix: change color of `ServerComponent`

* style(ServerSelect): use material typography

* chore: update ktlint config in build.gradle

* style: use material typography

* refactor: move home screen to separate layout function so it can be previewed

- Introduce dummy items
- Fix `UiText.asString()` composable

* refactor: preview `LibraryScreen`

* refactor: preview `ServerSelectScreen`

* refactor: preview `AddServerScreen`

* refactor: preview `UserSelectScreen`

* refactor: preview `LoginScreen`

* lint: run ktlintFormat

* feat: switch servers

* feat: main screen tabs navigation

* feat: add Live TV tab (not shown for now)

* chore: remove libraries from `HomeViewModel`

* chore: change colors of selected tab

* feat: new item card component

* chore: remove `HomeItem.Libraries`

* style: update spacing

* feat: add findroid icon and profile button on main screen

* style(main): add gradient background

* fix: use "latest" + library name in home screen

* fix: navigate from LoginScreen and UserSelectScreen to MainScreen

* style: update tab colors

* fix: remove reference to `HomeItem.Libraries` from `ViewListAdapter`

* chore: update kotlin compiler to 1.5.0

* feat: add horizontal item card variant

* feat: `LibrariesScreen`

* feat: `LibraryScreen`

* fix(`LibraryScreen`): remove hardcoded library name

* feat: `MovieScreen`

* feat(`MovieScreen`): Make trailer button work

Also hide the button when there is no trailer

* refactor(`MovieScreen`): move click logic out of layout

* refactor: create `FindroidImages` which holds all image uris

* build: upgrade androidx.tv to 1.0.0-alpha08

* chore: update compose libraries

* chore: update compose compiler to 1.5.1

* fix(ItemCard): only show progress when horizontal

* refactor: clean build.gradle.kts

* build: up minSdk to 28 and targetSdk to 34

* refactor: use spacings to provide paddings (jarnedemeulemeester#443)

* feat: add Spacings in MaterialTheme

* style: use MaterialTheme.spacings in layouts

Using sizes in Spacer & padding & PaddingValues to standardize it.

* fix: linting issues and a few paddings

* feat: use spacings in `LibraryScreen`

* feat: use spacings in `MovieScreen`

* fix: missing trailing comma

* refactor: replace hardcoded spacer in ItemCard with spacing

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>

* build: migrate to ksp and upgrade compose compiler

* build: upgrade compose libraries

* fix: align with main codebase

* chore: update agp to 8.1.3

* chore: update ksp and compose-destinations

ksp 1.9.10-1.0.13 -> 1.9.20-1.0.14
compose-destinations 1.9.51 -> 1.9.54

* refactor(UserSelectViewModel): use channel for events

* feat: basic video player

First implementation of the video player.
Uses the basic player view with no custom layout.
Only media keys are passed to the PlayerView.

* feat: show screen

Still a work in progress

* fix: make player background black

* fix(player): keep screen on

* feat: add border around focused tab

* lint: run ktlintFormat

* feat: focus improvements

* feat: logo for main screen

* fix: remember tab position

* feat: add loading indicator to main screen

And fix home and libraries screen list refresh on navigating back

* feat: add seasons to show screen

* feat: add season screen

* feat: add progress badge

* chore(deps) update dependencies

android-plugin 8.1.3 -> 8.1.4
androidx-activity 1.8.0 -> 1.8.1
androidx-media3 1.1.1 -> 1.2.0
coil 2.4.0 -> 2.5.0
kotlinx-serialization 1.6.0 -> 1.6.1

* ci: upload tv artifacts and don't build universal apks

* chore: get rid of deprecated android.defaults.buildfeatures.buildconfig

* build: upgrade dependencies

android-plugin 8.1.4 -> 8.2.0
androidx-room 2.6.0 -> 2.6.1
androidx-work 2.8.1 -> 2.9.0
jellyfin 1.4.5 -> 1.4.6

compose compiler 1.5.4 -> 1.5.5

* fix: workManagerConfiguration is now a property

* feat: add profile picture to main screen

* feat: start of settings screen

* refactor: base tv theme on normal compose material theme

* chore(deps): update kotlin to 1.9.21

kotlin 1.9.20 -> 1.9.21
ksp 1.9.20-1.0.14 -> 1.9.21-1.0.15
compose-compiler 1.5.5 -> 1.5.6

* feat(settings): add categories and pop backstack when navigating to main screen

* feat(settings): nested settings and switch setting

* feat(settings): settings select component

* feat(settings): icons for cache and about

* feat(settings): add option to toggle mpv player

* feat(settings): move preference value logic to viewmodel

* feat(settings): add dependencies

* chore: update compose compiler

compose-compiler 1.5.6 -> 1.5.7

* feat(settings): add settings detail select card

New sub settings screen with different layout
Settings detail select card to select an option

* feat: play episode from home screen

* feat(player): basic custom overlay

Courtesy of Android TV JetStreamCompose sample

* feat(player): add track selection dialog

* feat(player): add media session and clean up dpad events

* refactor(mpv): implement track selection via TrackSelectionParameters

Need to add ability to disable track type

* feat: implement watched and favorite buttons

* refactor: remove unused PreferenceType enum

---------
@zivshek
Copy link

zivshek commented Aug 29, 2024

great work!

@jarnedemeulemeester jarnedemeulemeester deleted the android-tv branch December 8, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Simplified track selection menu for mpv FEATURE REQUEST Android TV
8 participants