Commit graph

38 commits

Author SHA1 Message Date
Jarne Demeulemeester
7171ec72c1
feat: android tv (#598)
* 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 (#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

---------
2023-12-30 22:20:20 +01:00
Jarne Demeulemeester
75d2b835db
refactor: generate kotlin code for dao 2023-10-28 15:15:51 +02:00
jarnedemeulemeester
e32b4eec7d
refactor: clean up 2023-10-23 13:24:26 +02:00
jarnedemeulemeester
e210691705
refactor: move compileSdk, buildTools, minSdk, targetSdk and java to buildSrc Versions 2023-10-23 13:00:24 +02:00
Jarne Demeulemeester
16dd40d489
build: move app and ktlint version to buildSrc Versions 2023-10-15 15:43:55 +02:00
jarnedemeulemeester
a4dc94b310
refactor: get rid of databinding in ServerSelectFragment 2023-07-31 17:34:01 +02:00
Jarne Demeulemeester
0717103895
build: up min sdk to 28 (#456)
* build: bump min sdk to 28

* refactor: remove unnecessary checks

* refactor: remove unused import
2023-07-30 16:08:36 +02:00
Jarne Demeulemeester
75ea33fd33
feat: target sdk 34 (#405) 2023-07-30 14:50:58 +02:00
Jarne Demeulemeester
763c11f590
refactor: clean up CollectionType 2023-07-11 15:03:40 +02:00
renovate[bot]
80a86e2dfc
chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.5.0 (#426)
* chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.5.0

* feat: bump to ktlint 0.50.0

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-07-08 00:36:23 +02:00
jarnedemeulemeester
9874f26ead
fix(room): use 1 instead of TRUE 2023-06-22 08:51:28 +02:00
jarnedemeulemeester
5b49abfbc8
fix: add CollectionType to proguard-rules.pro 2023-06-20 19:42:16 +02:00
Jarne Demeulemeester
c0d39ba7a1
refactor: migrate room to ksp (#253) 2023-06-20 19:37:43 +02:00
jarnedemeulemeester
b9253badf8
chore: remove some unused files and dependencies 2023-06-20 13:02:48 +02:00
Jarne Demeulemeester
b426a920c3
lint: run ktlintFormat 2023-06-19 23:44:42 +02:00
renovate[bot]
07efae6f4c
chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.4.0 (#293)
* chore(deps): update dependency org.jlleitschuh.gradle.ktlint to v11.4.0

* fix: use .editorconfig

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2023-06-19 23:16:02 +02:00
Jarne Demeulemeester
de34d6e6e5
fix: cannot play from specific downloaded episode 2023-05-21 23:45:45 +02:00
Jarne Demeulemeester
1c117d3c66
fix: catch NullPointerException in BaseItemDto to FindroidEpisode conversion
This error is caused by the seriesId or seasonId being null. Hide these episodes for now.

Closes #357
Closes #360
2023-05-14 18:39:35 +02:00
Jarne Demeulemeester
fd33d52bba
feat: add product flavors libre and huawei
Huawei requires a different app icon. They don't like the Android Robot :(
2023-05-14 18:32:46 +02:00
Jarne Demeulemeester
219d0c033a
refactor: remove unused StorageViewModel and StorageItem 2023-05-13 21:49:48 +02:00
Jarne Demeulemeester
b816a2d460
perf: only request stream url when preparing player items 2023-05-13 21:34:05 +02:00
jarnedemeulemeester
765a31838e
fix: info text overlapping in movie and show fragments
Closes: #358
2023-05-13 11:27:24 +02:00
jarnedemeulemeester
9a3ed38fe6
feat: implement search for offline mode
Also fixes the crash when searching in offline mode
2023-05-11 17:11:55 +02:00
Jarne Demeulemeester
00c84fa9d5
Items and downloads rework (#329)
* refactor WIP: stop using `BaseItemDto` but use custom items specific to Findroid

This will make it easier to support downloaded items

* refactor: split `MediaInfoFragment` into `MovieFragment` and `ShowFragment`

* feat: add download icons to items

* feat WIP: download movies

* feat: download movie and play local file

* fix: remove `VideoVersionDialogFragment` from `ShowFragment`

* feat: select which version you want to download

* feat: delete downloaded movie

* feat: download progress indicator

* refactor: rename JellyfinItems to FindroidItems

* feat: offline mode (movies only)

* feat: offline mode card

* feat: download external files

* feat: toggle played on downloads

* feat: convert intros to `FindroidIntro`

* refactor: add itemId and sourceId to external downloaded subtitle filenames

* refactor: simplify `onMediaItemTransition`

* refactor: clean up some player item logic

* feat: download trickPlay data

* refactor: downloading of item to only require the item and a source id

* fix: external subtitle title

* feat: add `DownloadsFragment`

* feat: download episodes

* fix: cascade deletion if last item

* feat: download intro timestamps

* feat WIP: add storage activity

* feat: user data in separate table

* feat: add buttons to season fragment

* fix: improve responsiveness of the watched and favorite buttons

* fix: move `ic_database.xml` to main

* perf: optimize home fragment by limiting the number of items

* fix: database improvements

- use compound primary key for FindroidUserDataDto instead of id
- set played to false when playback percentage is below 90%
- capitalize SQL keywords
- update favorite in userdata
- set primary key of TrickPlayManifestDto to itemId
- prepare to sync data back to server

* feat: sync playback progress

This includes playback position, played and favorite

* fix: use non-transitive r classes

* lint: ktlint fix

* refactor: centralize item buttons in `item_actions.xml`

* feat: show intermediate progress when progress is less than 5

Also remove delete button from item_actions.xml

* feat: remove intros

* feat: check available storage space before downloading

* fix: trailer button

* refactor: make indexNumberEnd nullable

* feat: add offline mode toggle in settings

* fix: download over mobile data and roaming

* feat: immediately show spinner when tapping download

* revert: season fragment buttons

* feat: snackbar in downloads fragment

This snackbar is displayed when there is no connection to the server but the app is not in Offline Mode (Offline Mode is required to play content when the server is unavailable)

* refactor: make onReceive arguments non nullable

* fix: handle download finished / failed when BroadcastReceiver does not work

* fix: download multiple episodes

* feat: download to external storage (SD card)

* fix: reset download button when dialog is dismissed

* feat(offline): show "continue watching" episodes on home

* fix: watch progress bar on episode item in season

* feat(offline): next up items

* lint: fix some linting issues

* lint: fix some linting issues

* lint: fix some linting issues

* feat: remove StorageActivity

StorageActivity is not ready yet and out of scope for this PR

* fix: collection types that are not known crash the media fragment

* fix: downloading trick play data

* fix: sort downloaded items

* fix: navigate back if item is deleted instead of showing error

Navigate back based on NullPointerException in loadData method of viewmodels. This may not be the best approach but it works well enough.

Navigating back from BottomSheetFragment does not trigger onResume of previous fragment which in turn does not refresh its contents.

* fix: play from local storage instead of server when downloaded

* fix: missing items

* fix: `SyncWorker` using the app JellyfinApi instance instead of it's own

* fix: only show downloaded items when navigating from `DownloadsFragment`

* fix: make chips horizontal scrollable

* feat: migrate database (retain) and downloads (wipe)

Also add indexes on seriesId and seasonId

* fix: remove temp testing in downloadsMigrated

* lint: fix some linting issues

* fix: add error handling to downloading item

* feat: add "Preparing download" dialog to make sure the user waits for the download to start

* refactor: first show dialog then start downloading

* fix: add error handling to user configuration in `PlayerViewModel`

* feat: allow downloads to be cancelled

* fix: "View details" is cut off when text is too long

* lint: fix indent
2023-05-07 16:05:40 +02:00
renovate[bot]
2e6d069136
chore(deps): update dependency gradle to v8.1 (#332)
* Update dependency gradle to v8.1

* fix: remove @Suppress("DSL_SCOPE_VIOLATION") from build.gradle files

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-04-15 01:01:41 +02:00
renovate[bot]
22542614cd
chore(deps): update android-plugin to v8 (major) (#333)
* Update android-plugin to v8

* ci: upgrade to java 17

* fix: transitive R classes and buildconfig

* lint: fix ktlint issues

* lint: fix ktlint issues

* lint: fix ktlint issues

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2023-04-15 00:43:42 +02:00
Faywyrr
01d8c11a2c
feat: scrubbing preview (#295)
* Scrubbing Preview

Add Jellyscrub plugin support

* Fix syntax

* Some adjustments

Rounded corners
Fix switch

* refactor: switch to `StateFlow`

* refactor: remove `FrameLayout`

* refactor: move trick play retrieval to `onMediaItemTransition`

Only load trick play data for current item
Make it async

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-21 19:46:00 +01:00
renovate[bot]
86abe204f9
Update dependency gradle to v8 (#289)
* Update dependency gradle to v8

* fix: add compatibility with AGP 7.4 and remove some kotlin jvmTarget

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-13 21:58:05 +01:00
Jarne Demeulemeester
3c2b751df2
lint: fix errors 2023-02-11 12:09:51 +01:00
js6pak
5f7b7eaf63
Add CI (#236)
* Create main.yml

* Run ktlintFormat

* Don't error on translation lint issues

* Fix lint error about POST_NOTIFICATIONS permission

* Increase memory limit to speedup the build

* Only build debug

* refactor: rename `main.yml` to `build.yaml`

* lint: error on `ExtraTranslation`

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-11 12:01:02 +01:00
Yash Garg
a6570d8a02
feat(media): add detailed metadata for file on MediaInfoFragment (#246)
* feat: add video file metadata on `MediaInfoFragment`

* feat(metadata): add chips within a chipgroup to showcase major parameters

Set a "temp" text as default for chips since without it, the style resets when text is changed through code
(kind of a hacky fix)

* feat(parser): implement data model for VideoMetadata and parse function

* feat(metadata): show dolby/dts audio codecs and hide SDR display profile

* feat(dolby): add a dolby logo after the rating and per-theme color

* feat(settings): add a preference switch for showing detailed A/V & Subs info

* feat: add dolby logo for video and audio profile inside chip

* feat: handle different audio profiles and change raw names

* feat(audio): add atmos text with the audio codec itself

* feat: only parse metadata when item is a movie

Also correct spacing when there are no chips

* fix(metadata): check for DoVi title since codec shows as HDR10

* fixup!: parsing of audio codecs and display name

---------

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-02-07 22:24:16 +01:00
Jcuhfehl
83cd2374a3
Fix downloads with introskipper enabled (again) (#264) 2023-02-03 00:11:53 +01:00
Jarne Demeulemeester
352a418d20
Follow "Play next episode automatically" from user playback settings (#245)
* Add getUserConfiguration and use it in episodeToPlayerItems

* Add a TODO to move user config to separate class
2023-01-28 15:21:26 +01:00
Jcuhfehl
4b17e42d2d
Fix downloads when intro skipper is enabled and server is not reachable (#248) 2023-01-27 21:43:02 +01:00
js6pak
31fd1e3fdc
Add intro skipper support (#219)
* Add intro skipper support

* Fix checking for 404

* Add back missing Intro class and dependencies due to rebase

* Add preference

* Clean up visibility logic

* Update skip intro button design

* Add proguard file to keep Serializable classes

* Move introCheck to a separate Runnable and fix Runnables are never cleaned up

* Simplify check before starting runnable

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-01-15 15:20:56 +01:00
renovate[bot]
e0f07a3a96
Update android-plugin to v7.4.0 (#233)
* Update android-plugin to v7.4.0

* Set Java version to 11

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2023-01-14 20:21:37 +01:00
Jarne Demeulemeester
f107e79b72
Log in with Quick Connect (#234)
* Log in with Quick Connect

* Clean up LoginViewModel

* Cancel Quick Connect by tapping the button again

* Make quickConnectJob private
2023-01-14 18:21:42 +01:00
Jarne Demeulemeester
76121925d7
Modularize the codebase (#230)
* Split app into core and app:phone

* Use global versionCode and versionName

* Clean up gradle dependencies

* Use string formatting inside getString function

* Move proguard file to app:phone

* Move app_navigation and BasePlayerActivity to app:phone

* Add buildTypes to core gradle and remove buildFeatures

* Add suffix core to core namespace

* Split code into 4 more modules: data, preferences, player:core and player:video

* Clean up some gradle files

* Clean up data gradle

* Remove duplicate Constants.kt

* Use AppPreferences in more places

* Split off strings

* Remove unused animations

* Make about_libraries strings non-translatable

* Move mpv assets to player:video module

* Make AppPreferences a Singleton
2023-01-13 23:51:20 +01:00