Commit graph

126 commits

Author SHA1 Message Date
Jarne Demeulemeester
d6650eb994
Run ktlint 2022-12-11 21:05:53 +01:00
Jarne Demeulemeester
c712f05dda
Add search button to home fragment (#218) 2022-12-11 00:53:33 +01:00
Jarne Demeulemeester
6572d7e85b
Multiple server addresses (#208)
* Add multiple addresses per server

* Clean up

* Change icon to globe

* Fix AddServerAddressDialog crashing on tv

* Fix navigation to main activity on tv

* Hide nav bar in UsersFragment and ServerAddressesFragment

* Add hint for server address
2022-12-03 20:53:14 +01:00
Jarne Demeulemeester
ebcd2a898d
Fix tv server_select_fragment and users_fragment 2022-11-19 22:29:39 +01:00
Jarne Demeulemeester
aeabb620ee
Multi-user support (#199)
* Add multiple users per server

* Remove unnecessary longClickListener

* Check if user is selected on startup

* Still create JellyfinApi even if no user is selected

* Already fill in the username when needing to re-login
2022-11-19 21:18:50 +01:00
Jarne Demeulemeester
5895b2c8d8
Add network settings (#192)
* Add new network settings with socket timeout option

* Add socketTimeout to AppPreferences

* Format with ktlint

* Add request timeout and connect timeout as options
2022-11-05 23:59:44 +01:00
Jarne Demeulemeester
0bd1bb30c8
Fix app crash on ErrorDialogFragment.kt configuration change 2022-11-02 11:25:33 +01:00
Jarne Demeulemeester
ad5e722d44
Introduce klint (#186)
* Add ktlint plugin

* Make code ktlint compliant

* Make code ktlint compliant
2022-10-29 21:17:48 +02:00
Jcuhfehl
45ccea57af
Improve downloads management (#179)
* Fix deleted downloads

This commit fixes downloads getting deleted after a few weeks by android's cleanup system. This is fixed by downloading the files under the .download extension and renaming them when the download is completed.

* Add retry download feature

* Add indicator when download is ongoing

* Refactor download code

* Disable button on retry and clean up

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2022-10-29 15:08:43 +02:00
Jarne Demeulemeester
e40543c0f7
Add series name to episode sheet with navigation (#173)
Also limit the episode name to 3 lines
2022-09-25 23:58:50 +02:00
Jarne Demeulemeester
09189e4f85
Add subtitles settings button to player settings (#153) 2022-08-28 11:48:41 +02:00
Jarne Demeulemeester
c19350fa36
Small layout improvements (#145)
* Remove unused code

* Ellipsize primary and secondary name in home_episode_item

* Fix play icon color
2022-08-22 23:56:03 +02:00
Jarne Demeulemeester
8f117ccacb
Disable input elements in LoginFragment and AddServerFragment when loading
Fix a bug when adding a server keeps loading
Fix "Invalid username or password" error message
2022-08-21 16:59:33 +02:00
Jarne Demeulemeester
7b85df6e69
Display discovered servers on AddServerFragment (#143) 2022-08-21 16:45:57 +02:00
Jarne Demeulemeester
5d2409c93e
Display public users on login fragment (#142)
* Add public users to login fragment

* Display user image and hide recyclerview if no public users
2022-08-21 14:22:07 +02:00
Jarne Demeulemeester
3b7473b7a5
Bring Android TV back (#141)
* Merge MainActivity and MainActivityTv

* Merge AddServerFragment and TvAddServerFragment

* Merge LoginFragment and TvLoginFragment

* Add new focus effect

* Add libraries to tv home

* Fix home empty when navigating back on mobile

* Add loading indicator to home fragment

* Add empty LibraryFragment

* Add focus outline to settings button

* Use DiffCallback for updating home fragment

* Visually upgrade MediaDetailFragment

* Make all home items focusable in touch mode

* Add new focus border to person item

* Add LibraryFragment layout for TV

(Whilst also making a clusterfuck of the navigation)

* Add missing try-catch in HomeViewModel

* Don't show CancellationException on AddServerFragment

* Fix a few crashes plus errors
2022-08-20 14:41:38 +02:00
Jarne Demeulemeester
8552f0c469
Refactor the lifecycle state (#135) 2022-07-25 12:57:09 +02:00
Jarne Demeulemeester
ec6366508b
Layout improvements for larger screens (#134)
* Use NavigationRail on tablets

Width 600dp+

* Add next up item next to the description on tablets

Width 600dp+

* Add tv banners for debug and staging

* Clean up tv add server fragment

* Clean up tv login fragment
2022-07-22 16:29:25 +02:00
Jarne Demeulemeester
f400571e04
Customize the seeking increments (#128)
* Add the ability to customize the seeking increments

* Fix number keyboard image cache size

* Clean up fragment_settings_player.xml
2022-07-05 09:06:26 +02:00
Jarne Demeulemeester
22012873a0
Switch to new MenuProvider api 2022-07-03 15:21:29 +02:00
Jarne Demeulemeester
2b2041c569
Disable the connect and login buttons when the app is connecting / logging in 2022-07-03 14:29:23 +02:00
Jarne Demeulemeester
16c2cd634d
Add paging support to LibraryFragment (#124)
* Add paging support to the LibraryFragment

* Fix error handling
2022-06-17 15:16:29 +02:00
Jarne Demeulemeester
8c039a3c81
Upgrade to jellyfin-sdk 1.3.0 (#122)
Uses BaseItemKind to specify the item type
2022-06-11 21:39:08 +02:00
Jcuhfehl
c1740c1b68
Display downloaded episodes by series (#80)
* Display downloaded episodes by series

* Add offline playback to readme

* Remove accidentally commited changes

* Remove duplicate movie section in downloadviewmodel

* Fix issues with merging upstream

* Notify on download completion

* Fix trash icon color

* Update DownloadSeriesFragment to use new UiState system

* Clean up unused code

Co-authored-by: Jarne Demeulemeester <jarnedemeulemeester@gmail.com>
2022-06-11 13:35:52 +02:00
Jarne Demeulemeester
751ee75c3e
Provide better error messages with stacktrace (#119)
* Provide better error messages with stacktrace

+ clean up
+ fix error details popup in MediaInfoFragment

* Simplify exception passing by sending complete exception to the dialog

* Use viewLifecycleOwner with repeatOnLifecycle
2022-06-06 14:41:37 +02:00
Jarne Demeulemeester
c6385caf0f
Fix trailing slash in baseUrl not loading images (#114) 2022-04-29 23:49:41 +02:00
Jarne Demeulemeester
6d000882ea
Make extension functions setTintColor and setTintColorAttribute 2022-04-10 14:38:28 +02:00
Jarne Demeulemeester
d36ec1eb62
Fix played and favorite button changing color 2022-04-09 20:46:07 +02:00
Jarne Demeulemeester
ebdb00f311
Redesign settings to two pane layout (#90)
* Redesign settings to two pane layout

* Add downloads settings

* Suppress unused settings fragments warnings

* Fix download icon in other places

Also removes the filled download drawable
2022-02-19 17:33:58 +01:00
NIK679
1afeb54802
EpisodeBottomSheetFragment expanded by default (#76) 2022-02-12 16:19:24 +01:00
Jarne Demeulemeester
4e293faf13
Fix bottom navigation using multiple back stacks 2022-01-30 19:46:03 +01:00
Jarne Demeulemeester
fa236d369d
Upgrade dependencies
buildTools 31.0.0 -> 32.0.0
material 1.4.0 -> 1.5.0
navigation 2.3.5 -> 2.4.0
room 2.4.0 -> 2.4.1
2022-01-30 18:46:45 +01:00
Jarne Demeulemeester
3a41ba6882
Add missing check for canDownload in episode bottom sheet
Fix #75
2022-01-22 10:38:44 +01:00
Jarne Demeulemeester
93d6eb9b17
Fix delete button sometimes not visible 2022-01-21 18:28:06 +01:00
Jarne Demeulemeester
dca9902e10
Only show download button when user is allow to download
Fix #75
2022-01-21 17:39:28 +01:00
Jarne Demeulemeester
4b2dd6c672
Save downloads metadata to database (#81)
* Change downloads from metadata files to room database (WIP)

* Disable download progress

* Add file available check + clean up
2022-01-21 17:34:50 +01:00
Jarne Demeulemeester
7f1a3f6f90
Move unsupportedCollections to CollectionType 2022-01-01 21:45:57 +01:00
Jarne Demeulemeester
6522c6afac
Add loading indicator to MediaInfoFragment 2021-12-19 16:08:30 +01:00
Jarne Demeulemeester
c645ee3b81
New UI state system (#71)
* Convert MediaFragment to use new UiState

* Convert PersonDetailFragment to use new UiState

* Load PersonDetail data on start

* Convert FavoriteFragment to use new UiState

* Convert SeasonFragment to use new UiState

* Convert SearchResultFragment to use new UiState

* Convert EpisodeBottomSheetFragment to use new UiState (WIP)

* Convert EpisodeBottomSheetFragment to use new UiState (Part 2)

* Convert LibraryFragment to use new UiState

* Convert DownloadFragment to use new UiState

* Convert HomeFragment to use new UiState

* Convert MediaInfoFragment to use new UiState (WIP)

* Convert MediaInfoViewModel to use new UiState (Part 2)

* Convert ServerSelectViewModel to use new UiState (Semi)

* Fix MediaInfoFragment for downloaded movies
2021-12-19 15:35:36 +01:00
jarnedemeulemeester
ee9dedd7b7
Use view binding instead of data binding for AddServerFragment and LoginFragment 2021-11-27 18:56:55 +01:00
lsrom
94b3790560
Add image caching (#65)
* Add caching to settings with ability to choose cache size

* Remove unused parameter from Api

* Add glide module for cache setup

* Clean up image handling in adapters

* Move caching to it's own category

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-11-27 18:46:08 +01:00
Jcuhfehl
598c11f299
Improve offline playback (#68)
* Fix download playback tracking bug

* Remove unused permission

* Add overview text to downloadmetadata

* Add visual indicator of whether item is downloaded

* Use downloaded item when available

* Fix "null" overview text in download metadata

* Fix crash when playing downloaded file with mpv

* Clean up

Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2021-11-27 12:18:41 +01:00
lsrom
d7a47b0a3e
Add refresh (#59)
* Add refresh to home fragment

* Remove forgotten code

* Remove unnecessary condition and fix HomeSection equality check

* Make HomeFragment fragment view model again

* Add order dependent check for home items equality

* Fix loading state overwriting error state on home refresh

* Revert to older swiperefreshlayout version

* Fixing error and loading state

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-11-14 18:44:33 +01:00
Jarne Demeulemeester
98cb038c24
Server setup improvements (#67)
* Improve AddServer fragment

* Improve login fragment

With other general improvements

* Resize the addserver and login fragments when the soft keyboard appears

* Upgrade androidx.core to 1.7.0 and add lifecycle deps

* New UI state system for AddServerFragment

This uses StateFlow for the state and SharedFlow for navigation

* Remove public flows and use collector functions

* Update Login ViewModel and Fragment

* Speed up server discovery

* Better login error message
2021-11-14 18:20:19 +01:00
lsrom
f711d21f6a
Fix add server strings (#62)
* Add strings for errors when adding server

* Use add_server_error_version string instead of version

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-10-31 16:09:39 +01:00
lsrom
8c90031165
Add customizable device name (#61)
* Add ability to name your device

* Update device name real time

* Remove unnecessary deviceInfo and apiClientFactory

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-10-31 11:43:02 +01:00
lsrom
07a9e2a853
Add basic tv support (#58)
* Add basic leanback support

* Add TV home fragment

Adds basic media browsing screen for TV. Shows Home screen media.

* Fix double emit when loading user views

* Fix bug when going back to this screen would duplicate menu items

* Add basic media detail fragment

* Add ability to navigate to detail fragment

* Fix imports and null safe calls

* Fix displaying of home item view type media files

* Playback refactor

* Add basic Tv player controls and split PlayerActivity

* Update strings

* Add progress bar to partially played items on TV home screen

* Track selection dialog PoC

* Update track selection WIP

* Show track selection of focus change

* Fix series display from home

* Minor updates

* Add back button to media detail

* Zero effort add server and login

* Fix colors

* Fix back button from home going back to init fragment

* Add settings button to home screen

* Fix crash after goig back from media detail fragment

* Show seasons and cast

* Merge branch 'develop' into add_basic_tv_support

# Conflicts:
#	app/src/main/java/dev/jdtech/jellyfin/MainActivity.kt
#	app/src/main/java/dev/jdtech/jellyfin/dialogs/VideoVersionDialogFragment.kt
#	app/src/main/res/navigation/app_navigation.xml

* Fix cast title being shown with empty cast list

* Remove useless method

* Remove unused parameter

* Fix crash due to colorOnPrimary not existing in Leanback styles

* Remove unused theme

* Fix home to addserver fragment navigation

* Reuse home item layouts

This creates some duplicate code which will probably be cleaned up later

* Ignore more MissingDefaultResource

* Add banner

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-10-30 19:46:51 +02:00
Jcuhfehl
532e9adac1
Add offline playback (#51)
* Add offline playback

* Remove unused values

* Replace downloadutilities extension functions with normal functions

This is to not polute the namespace of fragment and context.

* Replace default Android icons with those from lucide

* Fix deleting downloaded movie

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-10-29 21:11:01 +02:00
lsrom
308d97068f
Refactor playback code (#55)
* Refactor playback code

* Fix back state when playing media and rotating device

Problem was playerItems were re-emitted on fragment creation after config change. LiveData by design emit on every subscribe (observe) so to avoid that there are several possibilities.

1) easiest, observe playerItems not in onCreate but in playButton.clickListener. Stupid, since then we need to remember to only observe in this special place.

2) SingleLiveData - kind of hacky since LiveData were designed to behave this way so we don't want to go against their design.

3) Use Kotlin flow instead.

I chose the flow approach since it's Kotlin native and modern way to do things and behaves much more Rx-like. Since now we need to call collect instead of observe and launch in coroutine, I added utility method to make this easier. Also, in the future we might want to improve this further, either by coming up with new way entirely or by at least moving this to parent fragment from which all fragments that want to play media will inherit and thus making it easy to use and maintain.

Co-authored-by: Jarne Demeulemeester <32322857+jarnedemeulemeester@users.noreply.github.com>
2021-10-26 18:11:22 +02:00
lsrom
62d09b3566
Add person detail screen (#47)
* Add person detail screen

Displays actor/actresses portrait and text info + list of movies/show this person starred in. Text info is max 5 lines with View More button if ellipsized. View More toggle is reset upon orientation change since in landscape mode ellipsize might not be necessary.

* Remove useless StarredInAdapter.kt

* Fix image view shape

* Improve UI

Not exactly how I would like it but will do for now

* Add error handling

Adds a lot of LiveData which may not be ideal, but is better than crashing due to connection errors.

Co-authored-by: jarnedemeulemeester <jarnedemeulemeester@gmail.com>
2021-10-24 17:45:59 +02:00