Commit graph

38 commits

Author SHA1 Message Date
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
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
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
jarnedemeulemeester
70d0d62318
Fix trailer button produces crash if no trailers are available 2021-09-05 12:28:37 +02:00
jarnedemeulemeester
25ac5524d7
Rework how player items are created
Add support for intros and improve loading speed
2021-08-26 15:36:56 +02:00
jarnedemeulemeester
d53fbf3369
Handle empty mediaSources 2021-08-25 11:00:58 +02:00
jarnedemeulemeester
1c6c8640b0
Ask for login if server responds with 401 2021-08-24 18:01:52 +02:00
jarnedemeulemeester
a067b6b13d
New error panel with details dialog 2021-08-22 18:47:25 +02:00
jarnedemeulemeester
f2ce030856
View detailed error message for playerItemsError 2021-08-22 11:47:25 +02:00
jarnedemeulemeester
d67e3fb39c
Add error handling to preparePlayerItems 2021-08-08 12:42:15 +02:00
jarnedemeulemeester
a8e9a40023
Play series from MediaInfoFragment 2021-08-06 20:01:30 +02:00
jarnedemeulemeester
d67f195789
Rework player to allow for playing multiple episodes in a row 2021-08-05 16:09:08 +02:00
jarnedemeulemeester
ea927793e3
Allow http connections + fix lifecycle warning 2021-08-02 18:14:41 +02:00
jarnedemeulemeester
fe7775329a
Add error handling to all fragments 2021-07-29 12:20:49 +02:00
Jarne Demeulemeester
b3af3e5aeb
Improve community rating visually 2021-07-20 17:25:58 +02:00
Jarne Demeulemeester
a91a8ba72f
Hide Cast & Crew section when there are none 2021-07-20 16:27:36 +02:00
Jarne Demeulemeester
dbc2582724
Mark item as played 2021-07-16 17:07:45 +02:00
Jarne Demeulemeester
6cf1f5cc49
Mark items as favorite 2021-07-16 14:45:35 +02:00
Jarne Demeulemeester
be8402fb37
Set starting playback position 2021-07-12 13:26:51 +02:00
Jarne Demeulemeester
e69a653453
Get mediaSources and select version of movie 2021-07-11 16:44:46 +02:00
Jarne Demeulemeester
fcbd7d1f33
First early test of ExoPlayer
Currently only plays some movies
2021-07-07 21:19:47 +02:00
Jarne Demeulemeester
2c8ddaad24
Add dependency injection to MediaInfoViewModel 2021-07-06 15:21:13 +02:00
Jarne Demeulemeester
cb005e1cf6
Add more dependency injection 2021-07-06 11:39:35 +02:00
Jarne Demeulemeester
f460c25a92
Big cleanup and refactoring 2021-07-05 22:38:20 +02:00
Jarne Demeulemeester
5e6099de93
Change how ViewModels get created 2021-07-05 15:25:30 +02:00
Jarne Demeulemeester
7c3640fa5f
Improve EpisodeBottomSheet 2021-07-03 16:24:58 +02:00
Jarne Demeulemeester
4329b76448
Add header to SeasonFragment 2021-06-28 13:08:04 +02:00
Jarne Demeulemeester
bc5a6f0723
Make trailer button functional 2021-06-27 15:57:39 +02:00
Jarne Demeulemeester
151ee6cae7
Implement SeasonFragment 2021-06-25 13:49:55 +02:00
Jarne Demeulemeester
2ce0755cf3
Add seasons to the MediaInfoFragment 2021-06-24 11:53:13 +02:00
Jarne Demeulemeester
4a1c4639aa
Add actors to MediaInfoFragment 2021-06-23 14:53:52 +02:00
Jarne Demeulemeester
c95ea3b586
Implement more dynamic data to MediaInfoFragment 2021-06-23 13:55:12 +02:00
Jarne Demeulemeester
cb721ac988
Start of view model for MediaInfoFragment 2021-06-22 16:44:36 +02:00
Jarne Demeulemeester
ac10b4ba67
Create media info fragment and set up navigation 2021-06-22 16:15:30 +02:00